praktikum6 18.11

This commit is contained in:
khaloufam70043 2019-11-19 15:26:29 +01:00
parent 3efafd6fe6
commit f66c98fa11
5850 changed files with 9081 additions and 589899 deletions

4835
.idea/workspace.xml generated

File diff suppressed because it is too large Load Diff

View File

@ -1,50 +1,20 @@
<!--<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>Index</title>
</head>
<body>
<h1>Index-Seite der Posts-Applikation</h1>
</body>
</html>
-->
{% extends 'base.html' %}
{% block title %}
Index
News
{% endblock %}
{% block content %}
<h1> Index der Polls-Applikation</h1>
<!DOCTYPE html>
<html>
<head>
<meta charset="utf-8">
<title>Navbar Example</title>
<link rel="stylesheet" href="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/css/bootstrap.min.css">
</head>
<body>
<h4>.navbar .navbar-expand-sm</h4>
<div class="container">
<!-- A horizontal navbar that becomes vertical on small screens -->
<nav class="navbar navbar-expand-sm bg-dark">
<!-- Links -->
<ul class="navbar-nav">
<li class="nav-item">
<a class="nav-link" href="https://www.th-nuernberg.de/fakultaeten/efi/">efi-homepage</a>
</li>
<li class="nav-item">
<a class="nav-link" href="https://www.google.de/?hl=de">google</a>
</li>
</ul>
</nav>
{% for notice in notices %}
<h3>{{ notice.notice_title }}</h3>
<p>{{ notice.notice_text }}</p>
{% endfor %}
</div>
<script src="https://code.jquery.com/jquery-3.2.1.slim.min.js"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.12.9/umd/popper.min.js"></script>
<script src="https://maxcdn.bootstrapcdn.com/bootstrap/4.0.0/js/bootstrap.min.js"></script>
</body>
</html>
{% endblock %}

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -37,6 +37,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'posts.apps.PostsConfig'
]
MIDDLEWARE = [

Binary file not shown.

Binary file not shown.

Binary file not shown.

View File

@ -0,0 +1,24 @@
# Generated by Django 2.2.7 on 2019-11-19 13:44
from django.db import migrations, models
class Migration(migrations.Migration):
initial = True
dependencies = [
]
operations = [
migrations.CreateModel(
name='Notice',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('notice_title', models.CharField(max_length=80)),
('notice_text', models.CharField(max_length=400)),
('pub_start', models.DateTimeField()),
('pub_end', models.DateTimeField()),
],
),
]

Binary file not shown.

View File

@ -1,3 +1,8 @@
from django.db import models
# Create your models here.
class Notice(models.Model):
notice_title = models.CharField(max_length=80)
notice_text = models.CharField(max_length=400)
pub_start = models.DateTimeField()
pub_end = models.DateTimeField()

View File

@ -1,6 +1,12 @@
from django.shortcuts import render
from .models import Notice
from django.utils import timezone
# Create your views here.
def index(request):
return render(request, 'Posts/index.html')
notices = Notice.objects.all()
notices = notices.filter(pub_start__lte=timezone.now() )
notices = notices.filter(pub_end__gte=timezone.now() )
context = { "notices": notices}
return render(request, 'Posts/index.html', context)

Binary file not shown.

View File

@ -37,7 +37,7 @@ deactivate () {
# unset irrelevant variables
deactivate nondestructive
VIRTUAL_ENV="/Users/khaloufam70043/Documents/news/venv"
VIRTUAL_ENV="/Users/khaloufam70043/PycharmProjects/Django/venv"
export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH"

View File

@ -8,7 +8,7 @@ alias deactivate 'test $?_OLD_VIRTUAL_PATH != 0 && setenv PATH "$_OLD_VIRTUAL_PA
# Unset irrelevant variables.
deactivate nondestructive
setenv VIRTUAL_ENV "/Users/khaloufam70043/Documents/news/venv"
setenv VIRTUAL_ENV "/Users/khaloufam70043/PycharmProjects/Django/venv"
set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/bin:$PATH"

View File

@ -29,7 +29,7 @@ end
# unset irrelevant variables
deactivate nondestructive
set -gx VIRTUAL_ENV "/Users/khaloufam70043/Documents/news/venv"
set -gx VIRTUAL_ENV "/Users/khaloufam70043/PycharmProjects/Django/venv"
set -gx _OLD_VIRTUAL_PATH $PATH
set -gx PATH "$VIRTUAL_ENV/bin" $PATH

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# -*- coding: utf-8 -*-
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
from django.core import management
if __name__ == "__main__":

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install'
__requires__ = 'setuptools==39.1.0'
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7'
__requires__ = 'setuptools==39.1.0'
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip'
__requires__ = 'pip==10.0.1'
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3'
__requires__ = 'pip==10.0.1'
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7'
__requires__ = 'pip==10.0.1'
import re

View File

@ -1,4 +1,4 @@
#!/Users/khaloufam70043/Documents/news/venv/bin/python
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python
# -*- coding: utf-8 -*-
import re

View File

@ -1,84 +0,0 @@
Metadata-Version: 2.1
Name: Django
Version: 2.2.6
Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
Home-page: https://www.djangoproject.com/
Author: Django Software Foundation
Author-email: foundation@djangoproject.com
License: BSD
Project-URL: Documentation, https://docs.djangoproject.com/
Project-URL: Funding, https://www.djangoproject.com/fundraising/
Project-URL: Source, https://github.com/django/django
Project-URL: Tracker, https://code.djangoproject.com/
Platform: UNKNOWN
Classifier: Development Status :: 5 - Production/Stable
Classifier: Environment :: Web Environment
Classifier: Framework :: Django
Classifier: Intended Audience :: Developers
Classifier: License :: OSI Approved :: BSD License
Classifier: Operating System :: OS Independent
Classifier: Programming Language :: Python
Classifier: Programming Language :: Python :: 3
Classifier: Programming Language :: Python :: 3.5
Classifier: Programming Language :: Python :: 3.6
Classifier: Programming Language :: Python :: 3.7
Classifier: Programming Language :: Python :: 3 :: Only
Classifier: Topic :: Internet :: WWW/HTTP
Classifier: Topic :: Internet :: WWW/HTTP :: Dynamic Content
Classifier: Topic :: Internet :: WWW/HTTP :: WSGI
Classifier: Topic :: Software Development :: Libraries :: Application Frameworks
Classifier: Topic :: Software Development :: Libraries :: Python Modules
Requires-Python: >=3.5
Requires-Dist: pytz
Requires-Dist: sqlparse
Provides-Extra: argon2
Requires-Dist: argon2-cffi (>=16.1.0) ; extra == 'argon2'
Provides-Extra: bcrypt
Requires-Dist: bcrypt ; extra == 'bcrypt'
Django is a high-level Python Web framework that encourages rapid development
and clean, pragmatic design. Thanks for checking it out.
All documentation is in the "``docs``" directory and online at
https://docs.djangoproject.com/en/stable/. If you're just getting started,
here's how we recommend you read the docs:
* First, read ``docs/intro/install.txt`` for instructions on installing Django.
* Next, work through the tutorials in order (``docs/intro/tutorial01.txt``,
``docs/intro/tutorial02.txt``, etc.).
* If you want to set up an actual deployment server, read
``docs/howto/deployment/index.txt`` for instructions.
* You'll probably want to read through the topical guides (in ``docs/topics``)
next; from there you can jump to the HOWTOs (in ``docs/howto``) for specific
problems, and check out the reference (``docs/ref``) for gory details.
* See ``docs/README`` for instructions on building an HTML version of the docs.
Docs are updated rigorously. If you find any problems in the docs, or think
they should be clarified in any way, please take 30 seconds to fill out a
ticket here: https://code.djangoproject.com/newticket
To get more help:
* Join the ``#django`` channel on irc.freenode.net. Lots of helpful people hang
out there. See https://en.wikipedia.org/wiki/Wikipedia:IRC/Tutorial if you're
new to IRC.
* Join the django-users mailing list, or read the archives, at
https://groups.google.com/group/django-users.
To contribute to Django:
* Check out https://docs.djangoproject.com/en/dev/internals/contributing/ for
information about getting involved.
To run Django's test suite:
* Follow the instructions in the "Unit tests" section of
``docs/internals/contributing/writing-code/unit-tests.txt``, published online at
https://docs.djangoproject.com/en/dev/internals/contributing/writing-code/unit-tests/#running-the-unit-tests

File diff suppressed because it is too large Load Diff

View File

@ -1,5 +0,0 @@
Wheel-Version: 1.0
Generator: bdist_wheel (0.33.4)
Root-Is-Purelib: true
Tag: py3-none-any

File diff suppressed because it is too large Load Diff

View File

@ -1,6 +1,6 @@
from django.utils.version import get_version
VERSION = (2, 2, 6, 'final', 0)
VERSION = (2, 2, 7, 'final', 0)
__version__ = get_version(VERSION)

Some files were not shown because too many files have changed in this diff Show More