Templates

This commit is contained in:
Amad Colovic 2019-11-05 15:08:44 +01:00
parent 95d6b4adee
commit b7aadda74c
29 changed files with 80 additions and 4363 deletions

View File

@ -1,7 +1,6 @@
from django.http import HttpResponse from django.shortcuts import render
def index (request): def index (request):
return HttpResponse("Index-Seite der Posts-Applikation") return render(request, 'posts/index.html')

22
templates/base.html Normal file
View File

@ -0,0 +1,22 @@
<!DOCTYPE html>
<html lang="en">
<head>
<meta charset="UTF-8">
<title>{% block title %} Platzhalter {% endblock %}</title>
<link rel="stylesheet" href="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/css/bootstrap.min.css"
integrity="sha384-ggOyR0iXCbMQv3Xipma34MD+dH/1fQ784/j6cY/iJTQUOhcWr7x9JvoRxT2MZw1T" crossorigin="anonymous">
<script src="https://code.jquery.com/jquery-3.3.1.slim.min.js"
integrity="sha384-q8i/X+965DzO0rT7abK41JStQIAqVgRVzpbzo5smXKp4YfRvH+8abtTE1Pi6jizo"
crossorigin="anonymous"></script>
<script src="https://cdnjs.cloudflare.com/ajax/libs/popper.js/1.14.7/umd/popper.min.js"
integrity="sha384-UO2eT0CpHqdSJQ6hJty5KVphtPhzWj9WO1clHTMGa3JDZwrnQq4sF86dIHNDz0W1"
crossorigin="anonymous"></script>
<script src="https://stackpath.bootstrapcdn.com/bootstrap/4.3.1/js/bootstrap.min.js"
integrity="sha384-JjSmVgyd0p3pXB1rRibZUAYoIIy6OrQ6VrjIEaFf/nJGzIxFDsf4x0xIM+B07jRM"
crossorigin="anonymous"></script>
</head>
<body>
{% block navigation %} Platzhalter {% endblock %}
{% block content %} Platzhalter {% endblock %}
</body>
</html>

View File

@ -0,0 +1,24 @@
{% extends 'base.html' %}
{% block title %}
Index
{% endblock %}
{% block content %}
<div class="jumbotron">
<h1>Bootstrap Tutorials</h1>
<p>
Bootstrap is a free, open-source and is the most popular HTML, CSS,
and JavaScript framework developed by twitter for creating
responsive web applications.
</p>
<p>
<a class="btn btn-lg btn-primary" href="http://www.google.com">
Frag Amad
</a>
</p>
</div>
<h1> Index der Polls-Applikation</h1>
{% endblock %}

View File

@ -37,7 +37,7 @@ deactivate () {
# unset irrelevant variables # unset irrelevant variables
deactivate nondestructive deactivate nondestructive
VIRTUAL_ENV="/Users/colovicam63900/PycharmProjects/news/venv" VIRTUAL_ENV="/Users/colovicam63900/Desktop/mysite/venv"
export VIRTUAL_ENV export VIRTUAL_ENV
_OLD_VIRTUAL_PATH="$PATH" _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. # Unset irrelevant variables.
deactivate nondestructive deactivate nondestructive
setenv VIRTUAL_ENV "/Users/colovicam63900/PycharmProjects/news/venv" setenv VIRTUAL_ENV "/Users/colovicam63900/Desktop/mysite/venv"
set _OLD_VIRTUAL_PATH="$PATH" set _OLD_VIRTUAL_PATH="$PATH"
setenv PATH "$VIRTUAL_ENV/bin:$PATH" setenv PATH "$VIRTUAL_ENV/bin:$PATH"

View File

@ -29,7 +29,7 @@ end
# unset irrelevant variables # unset irrelevant variables
deactivate nondestructive deactivate nondestructive
set -gx VIRTUAL_ENV "/Users/colovicam63900/PycharmProjects/news/venv" set -gx VIRTUAL_ENV "/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/venv/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re

View File

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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/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

View File

@ -1,4 +1,4 @@
#!/Users/colovicam63900/PycharmProjects/news/venv/bin/python #!/Users/colovicam63900/Desktop/mysite/venv/bin/python
# -*- coding: utf-8 -*- # -*- coding: utf-8 -*-
import re import re

View File

@ -1,27 +0,0 @@
Copyright (c) Django Software Foundation and individual contributors.
All rights reserved.
Redistribution and use in source and binary forms, with or without modification,
are permitted provided that the following conditions are met:
1. Redistributions of source code must retain the above copyright notice,
this list of conditions and the following disclaimer.
2. Redistributions in binary form must reproduce the above copyright
notice, this list of conditions and the following disclaimer in the
documentation and/or other materials provided with the distribution.
3. Neither the name of Django nor the names of its contributors may be used
to endorse or promote products derived from this software without
specific prior written permission.
THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND
ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR
ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES
(INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES;
LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON
ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT
(INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS
SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

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

View File

@ -1,3 +0,0 @@
[console_scripts]
django-admin = django.core.management:execute_from_command_line

View File

@ -1,6 +1,6 @@
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)

View File

@ -8,7 +8,7 @@ class PostgresSimpleLookup(Lookup):
def as_sql(self, qn, connection): def as_sql(self, qn, connection):
lhs, lhs_params = self.process_lhs(qn, connection) lhs, lhs_params = self.process_lhs(qn, connection)
rhs, rhs_params = self.process_rhs(qn, connection) rhs, rhs_params = self.process_rhs(qn, connection)
params = lhs_params + rhs_params params = tuple(lhs_params) + tuple(rhs_params)
return '%s %s %s' % (lhs, self.operator, rhs), params return '%s %s %s' % (lhs, self.operator, rhs), params

View File

@ -344,21 +344,21 @@ class Command(BaseCommand):
def describe_operation(operation, backwards): def describe_operation(operation, backwards):
"""Return a string that describes a migration operation for --plan.""" """Return a string that describes a migration operation for --plan."""
prefix = '' prefix = ''
is_error = False
if hasattr(operation, 'code'): if hasattr(operation, 'code'):
code = operation.reverse_code if backwards else operation.code code = operation.reverse_code if backwards else operation.code
action = code.__doc__ if code else '' action = (code.__doc__ or '') if code else None
elif hasattr(operation, 'sql'): elif hasattr(operation, 'sql'):
action = operation.reverse_sql if backwards else operation.sql action = operation.reverse_sql if backwards else operation.sql
else: else:
action = '' action = ''
if backwards: if backwards:
prefix = 'Undo ' prefix = 'Undo '
if action is None: if action is not None:
action = str(action).replace('\n', '')
elif backwards:
action = 'IRREVERSIBLE' action = 'IRREVERSIBLE'
is_error = True is_error = True
else:
action = str(action).replace('\n', '')
is_error = False
if action: if action:
action = ' -> ' + action action = ' -> ' + action
truncated = Truncator(action) truncated = Truncator(action)

View File

@ -110,13 +110,14 @@ class IndexColumns(Columns):
def __str__(self): def __str__(self):
def col_str(column, idx): def col_str(column, idx):
try:
col = self.quote_name(column) + self.col_suffixes[idx]
except IndexError:
col = self.quote_name(column)
# Index.__init__() guarantees that self.opclasses is the same # Index.__init__() guarantees that self.opclasses is the same
# length as self.columns. # length as self.columns.
return '{} {}'.format(col, self.opclasses[idx]) col = '{} {}'.format(self.quote_name(column), self.opclasses[idx])
try:
col = '{} {}'.format(col, self.col_suffixes[idx])
except IndexError:
pass
return col
return ', '.join(col_str(column, idx) for idx, column in enumerate(self.columns)) return ', '.join(col_str(column, idx) for idx, column in enumerate(self.columns))

View File

@ -743,8 +743,12 @@ class Field(RegisterLookupMixin):
if not getattr(cls, self.attname, None): if not getattr(cls, self.attname, None):
setattr(cls, self.attname, DeferredAttribute(self.attname)) setattr(cls, self.attname, DeferredAttribute(self.attname))
if self.choices: if self.choices:
setattr(cls, 'get_%s_display' % self.name, if not hasattr(cls, 'get_%s_display' % self.name):
partialmethod(cls._get_FIELD_display, field=self)) setattr(
cls,
'get_%s_display' % self.name,
partialmethod(cls._get_FIELD_display, field=self),
)
def get_filter_kwargs_for_object(self, obj): def get_filter_kwargs_for_object(self, obj):
""" """

View File

@ -26,7 +26,7 @@ sqlparse-0.3.0.dist-info/WHEEL,sha256=HX-v9-noUkyUoxyZ1PMSuS7auUxDAR4VBdoYLqD0xw
sqlparse-0.3.0.dist-info/entry_points.txt,sha256=S2WxhPln7zXybKRE73ekBicXHh7_BX-KYGFZZaGGqp8,54 sqlparse-0.3.0.dist-info/entry_points.txt,sha256=S2WxhPln7zXybKRE73ekBicXHh7_BX-KYGFZZaGGqp8,54
sqlparse-0.3.0.dist-info/top_level.txt,sha256=eRYisOR7d8EtLKXuWUUAAMOhODItOqrkpxkAGD8CISo,9 sqlparse-0.3.0.dist-info/top_level.txt,sha256=eRYisOR7d8EtLKXuWUUAAMOhODItOqrkpxkAGD8CISo,9
sqlparse-0.3.0.dist-info/RECORD,, sqlparse-0.3.0.dist-info/RECORD,,
../../../bin/sqlformat,sha256=HGuFpwg5929hll-1RfbZsLh33qFbWG2y4Qi8S-0yP9I,262 ../../../bin/sqlformat,sha256=7AaJs39h263DC_lmnA7xmCchMGfKQN82n6LnsyjirRI,256
sqlparse-0.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4 sqlparse-0.3.0.dist-info/INSTALLER,sha256=zuuue4knoyJ-UwPPXg8fezS7VCrXJQrAP7zeNuwvFQg,4
sqlparse/filters/__pycache__/output.cpython-37.pyc,, sqlparse/filters/__pycache__/output.cpython-37.pyc,,
sqlparse/filters/__pycache__/aligned_indent.cpython-37.pyc,, sqlparse/filters/__pycache__/aligned_indent.cpython-37.pyc,,

View File

@ -1 +1 @@
{"last_check":"2019-10-29T13:15:05Z","pypi_version":"19.3.1"} {"last_check":"2019-11-05T13:22:52Z","pypi_version":"19.3.1"}