<!--<!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' %} | {% extends 'base.html' %} | ||||
{% block title %} | {% block title %} | ||||
Index | |||||
News | |||||
{% endblock %} | {% endblock %} | ||||
{% block content %} | {% block content %} | ||||
<h1> Index der Polls-Applikation</h1> | <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 %} | {% endblock %} | ||||
'django.contrib.sessions', | 'django.contrib.sessions', | ||||
'django.contrib.messages', | 'django.contrib.messages', | ||||
'django.contrib.staticfiles', | 'django.contrib.staticfiles', | ||||
'posts.apps.PostsConfig' | |||||
] | ] | ||||
MIDDLEWARE = [ | MIDDLEWARE = [ |
# 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()), | |||||
], | |||||
), | |||||
] |
from django.db import models | from django.db import models | ||||
# Create your models here. | # 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() |
from django.shortcuts import render | from django.shortcuts import render | ||||
from .models import Notice | |||||
from django.utils import timezone | |||||
# Create your views here. | # Create your views here. | ||||
def index(request): | 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) |
# unset irrelevant variables | # unset irrelevant variables | ||||
deactivate nondestructive | deactivate nondestructive | ||||
VIRTUAL_ENV="/Users/khaloufam70043/Documents/news/venv" | |||||
VIRTUAL_ENV="/Users/khaloufam70043/PycharmProjects/Django/venv" | |||||
export VIRTUAL_ENV | export VIRTUAL_ENV | ||||
_OLD_VIRTUAL_PATH="$PATH" | _OLD_VIRTUAL_PATH="$PATH" |
# Unset irrelevant variables. | # Unset irrelevant variables. | ||||
deactivate nondestructive | deactivate nondestructive | ||||
setenv VIRTUAL_ENV "/Users/khaloufam70043/Documents/news/venv" | |||||
setenv VIRTUAL_ENV "/Users/khaloufam70043/PycharmProjects/Django/venv" | |||||
set _OLD_VIRTUAL_PATH="$PATH" | set _OLD_VIRTUAL_PATH="$PATH" | ||||
setenv PATH "$VIRTUAL_ENV/bin:$PATH" | setenv PATH "$VIRTUAL_ENV/bin:$PATH" |
# unset irrelevant variables | # unset irrelevant variables | ||||
deactivate nondestructive | 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 _OLD_VIRTUAL_PATH $PATH | ||||
set -gx PATH "$VIRTUAL_ENV/bin" $PATH | set -gx PATH "$VIRTUAL_ENV/bin" $PATH |
#!/Users/khaloufam70043/Documents/news/venv/bin/python | |||||
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
import re | import re |
#!/Users/khaloufam70043/Documents/news/venv/bin/python | |||||
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python | |||||
from django.core import management | from django.core import management | ||||
if __name__ == "__main__": | if __name__ == "__main__": |
#!/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' | # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install' | ||||
__requires__ = 'setuptools==39.1.0' | __requires__ = 'setuptools==39.1.0' | ||||
import re | import re |
#!/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' | # EASY-INSTALL-ENTRY-SCRIPT: 'setuptools==39.1.0','console_scripts','easy_install-3.7' | ||||
__requires__ = 'setuptools==39.1.0' | __requires__ = 'setuptools==39.1.0' | ||||
import re | import re |
#!/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' | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip' | ||||
__requires__ = 'pip==10.0.1' | __requires__ = 'pip==10.0.1' | ||||
import re | import re |
#!/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' | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3' | ||||
__requires__ = 'pip==10.0.1' | __requires__ = 'pip==10.0.1' | ||||
import re | import re |
#!/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' | # EASY-INSTALL-ENTRY-SCRIPT: 'pip==10.0.1','console_scripts','pip3.7' | ||||
__requires__ = 'pip==10.0.1' | __requires__ = 'pip==10.0.1' | ||||
import re | import re |
#!/Users/khaloufam70043/Documents/news/venv/bin/python | |||||
#!/Users/khaloufam70043/PycharmProjects/Django/venv/bin/python | |||||
# -*- coding: utf-8 -*- | # -*- coding: utf-8 -*- | ||||
import re | import re |
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 | |||||
Wheel-Version: 1.0 | |||||
Generator: bdist_wheel (0.33.4) | |||||
Root-Is-Purelib: true | |||||
Tag: py3-none-any | |||||
from django.utils.version import get_version | from django.utils.version import get_version | ||||
VERSION = (2, 2, 6, 'final', 0) | |||||
VERSION = (2, 2, 7, 'final', 0) | |||||
__version__ = get_version(VERSION) | __version__ = get_version(VERSION) | ||||