Compare commits
No commits in common. "a67575f7132b0065e7caf52393038f9d573fb5ba" and "325e5d8891378fd3730158a9215c2bf339f073db" have entirely different histories.
a67575f713
...
325e5d8891
90
.gitignore
vendored
90
.gitignore
vendored
@ -1,90 +0,0 @@
|
|||||||
### OSX ###
|
|
||||||
.DS_Store
|
|
||||||
.AppleDouble
|
|
||||||
.LSOverride
|
|
||||||
|
|
||||||
# Icon must end with two \r
|
|
||||||
Icon
|
|
||||||
|
|
||||||
|
|
||||||
# Thumbnails
|
|
||||||
._*
|
|
||||||
|
|
||||||
# Files that might appear on external disk
|
|
||||||
.Spotlight-V100
|
|
||||||
.Trashes
|
|
||||||
|
|
||||||
# Directories potentially created on remote AFP share
|
|
||||||
.AppleDB
|
|
||||||
.AppleDesktop
|
|
||||||
Network Trash Folder
|
|
||||||
Temporary Items
|
|
||||||
.apdisk
|
|
||||||
|
|
||||||
|
|
||||||
### Python ###
|
|
||||||
# Byte-compiled / optimized / DLL files
|
|
||||||
__pycache__/
|
|
||||||
*.py[cod]
|
|
||||||
|
|
||||||
# C extensions
|
|
||||||
*.so
|
|
||||||
|
|
||||||
# Distribution / packaging
|
|
||||||
.Python
|
|
||||||
env/
|
|
||||||
build/
|
|
||||||
develop-eggs/
|
|
||||||
dist/
|
|
||||||
downloads/
|
|
||||||
eggs/
|
|
||||||
lib/
|
|
||||||
lib64/
|
|
||||||
parts/
|
|
||||||
sdist/
|
|
||||||
var/
|
|
||||||
*.egg-info/
|
|
||||||
.installed.cfg
|
|
||||||
*.egg
|
|
||||||
|
|
||||||
# PyInstaller
|
|
||||||
# Usually these files are written by a python script from a template
|
|
||||||
# before PyInstaller builds the exe, so as to inject date/other infos into it.
|
|
||||||
*.manifest
|
|
||||||
*.spec
|
|
||||||
|
|
||||||
# Installer logs
|
|
||||||
pip-log.txt
|
|
||||||
pip-delete-this-directory.txt
|
|
||||||
|
|
||||||
# Unit test / coverage reports
|
|
||||||
htmlcov/
|
|
||||||
.tox/
|
|
||||||
.coverage
|
|
||||||
.cache
|
|
||||||
nosetests.xml
|
|
||||||
coverage.xml
|
|
||||||
|
|
||||||
# Translations
|
|
||||||
*.mo
|
|
||||||
*.pot
|
|
||||||
|
|
||||||
# Sphinx documentation
|
|
||||||
docs/_build/
|
|
||||||
|
|
||||||
# PyBuilder
|
|
||||||
target/
|
|
||||||
|
|
||||||
|
|
||||||
### Django ###
|
|
||||||
*.log
|
|
||||||
*.pot
|
|
||||||
*.pyc
|
|
||||||
**__pycache__/
|
|
||||||
local_settings.py
|
|
||||||
|
|
||||||
.env
|
|
||||||
**/db.sqlite3
|
|
||||||
|
|
||||||
# PyCharm
|
|
||||||
**/.idea/
|
|
2
.idea/misc.xml
generated
2
.idea/misc.xml
generated
@ -3,5 +3,5 @@
|
|||||||
<component name="JavaScriptSettings">
|
<component name="JavaScriptSettings">
|
||||||
<option name="languageLevel" value="ES6" />
|
<option name="languageLevel" value="ES6" />
|
||||||
</component>
|
</component>
|
||||||
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (Django)" project-jdk-type="Python SDK" />
|
<component name="ProjectRootManager" version="2" project-jdk-name="Python 3.7 (news)" project-jdk-type="Python SDK" />
|
||||||
</project>
|
</project>
|
2
.idea/news.iml
generated
2
.idea/news.iml
generated
@ -16,7 +16,7 @@
|
|||||||
<content url="file://$MODULE_DIR$">
|
<content url="file://$MODULE_DIR$">
|
||||||
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
<excludeFolder url="file://$MODULE_DIR$/venv" />
|
||||||
</content>
|
</content>
|
||||||
<orderEntry type="jdk" jdkName="Python 3.7 (Django)" jdkType="Python SDK" />
|
<orderEntry type="inheritedJdk" />
|
||||||
<orderEntry type="sourceFolder" forTests="false" />
|
<orderEntry type="sourceFolder" forTests="false" />
|
||||||
</component>
|
</component>
|
||||||
<component name="TemplatesService">
|
<component name="TemplatesService">
|
||||||
|
BIN
db.sqlite3
BIN
db.sqlite3
Binary file not shown.
0
news/__init__.py
Executable file → Normal file
0
news/__init__.py
Executable file → Normal file
1
news/settings.py
Executable file → Normal file
1
news/settings.py
Executable file → Normal file
@ -37,7 +37,6 @@ INSTALLED_APPS = [
|
|||||||
'django.contrib.sessions',
|
'django.contrib.sessions',
|
||||||
'django.contrib.messages',
|
'django.contrib.messages',
|
||||||
'django.contrib.staticfiles',
|
'django.contrib.staticfiles',
|
||||||
'posts.apps.PostsConfig',
|
|
||||||
]
|
]
|
||||||
|
|
||||||
MIDDLEWARE = [
|
MIDDLEWARE = [
|
||||||
|
0
news/urls.py
Executable file → Normal file
0
news/urls.py
Executable file → Normal file
0
news/wsgi.py
Executable file → Normal file
0
news/wsgi.py
Executable file → Normal file
0
posts/__init__.py
Executable file → Normal file
0
posts/__init__.py
Executable file → Normal file
0
posts/admin.py
Executable file → Normal file
0
posts/admin.py
Executable file → Normal file
0
posts/apps.py
Executable file → Normal file
0
posts/apps.py
Executable file → Normal file
@ -1,24 +0,0 @@
|
|||||||
# Generated by Django 2.2.7 on 2019-11-19 13:28
|
|
||||||
|
|
||||||
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()),
|
|
||||||
],
|
|
||||||
),
|
|
||||||
]
|
|
0
posts/migrations/__init__.py
Executable file → Normal file
0
posts/migrations/__init__.py
Executable file → Normal file
5
posts/models.py
Executable file → Normal file
5
posts/models.py
Executable file → Normal file
@ -1,8 +1,3 @@
|
|||||||
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()
|
|
0
posts/tests.py
Executable file → Normal file
0
posts/tests.py
Executable file → Normal file
0
posts/urls.py
Executable file → Normal file
0
posts/urls.py
Executable file → Normal file
9
posts/views.py
Executable file → Normal file
9
posts/views.py
Executable file → Normal file
@ -1,13 +1,6 @@
|
|||||||
from django.shortcuts import render
|
from django.shortcuts import render
|
||||||
from .models import Notice
|
|
||||||
from django.utils import timezone
|
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
def index (request):
|
def index (request):
|
||||||
notices = Notice.objects.all()
|
return render(request, 'posts/index.html')
|
||||||
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)
|
|
||||||
|
|
||||||
|
0
templates/base.html
Executable file → Normal file
0
templates/base.html
Executable file → Normal file
14
templates/posts/index.html
Executable file → Normal file
14
templates/posts/index.html
Executable file → Normal file
@ -1,22 +1,11 @@
|
|||||||
{% extends 'base.html' %}
|
{% extends 'base.html' %}
|
||||||
|
|
||||||
{% block title %}
|
{% block title %}
|
||||||
News
|
Index
|
||||||
{% endblock %}
|
{% endblock %}
|
||||||
|
|
||||||
{% block content %}
|
{% block content %}
|
||||||
|
|
||||||
<div class="container">
|
|
||||||
|
|
||||||
{% for notice in notices %}
|
|
||||||
<h3>{{ notice.notice_title }}</h3>
|
|
||||||
<p>{{ notice.notice_text }}</p>
|
|
||||||
{% endfor %}
|
|
||||||
|
|
||||||
</div>
|
|
||||||
|
|
||||||
{% endblock %}
|
|
||||||
|
|
||||||
|
|
||||||
<!DOCTYPE html>
|
<!DOCTYPE html>
|
||||||
<html>
|
<html>
|
||||||
@ -48,3 +37,4 @@
|
|||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
<h1> Index der Polls-Applikation</h1>
|
<h1> Index der Polls-Applikation</h1>
|
||||||
|
{% endblock %}
|
@ -37,7 +37,7 @@ deactivate () {
|
|||||||
# unset irrelevant variables
|
# unset irrelevant variables
|
||||||
deactivate nondestructive
|
deactivate nondestructive
|
||||||
|
|
||||||
VIRTUAL_ENV="/Users/herrerahuezoul67409/PycharmProjects/Django/venv"
|
VIRTUAL_ENV="/Users/colovicam63900/Desktop/mysite/venv"
|
||||||
export VIRTUAL_ENV
|
export VIRTUAL_ENV
|
||||||
|
|
||||||
_OLD_VIRTUAL_PATH="$PATH"
|
_OLD_VIRTUAL_PATH="$PATH"
|
||||||
|
@ -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/herrerahuezoul67409/PycharmProjects/Django/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"
|
||||||
|
@ -29,7 +29,7 @@ end
|
|||||||
# unset irrelevant variables
|
# unset irrelevant variables
|
||||||
deactivate nondestructive
|
deactivate nondestructive
|
||||||
|
|
||||||
set -gx VIRTUAL_ENV "/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
#!/Users/colovicam63900/Desktop/mysite/venv/bin/python
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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__":
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/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
|
||||||
|
@ -1,4 +1,4 @@
|
|||||||
#!/Users/herrerahuezoul67409/PycharmProjects/Django/venv/bin/python
|
#!/Users/colovicam63900/Desktop/mysite/venv/bin/python
|
||||||
|
|
||||||
# -*- coding: utf-8 -*-
|
# -*- coding: utf-8 -*-
|
||||||
import re
|
import re
|
||||||
|
Binary file not shown.
@ -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=ok4bpX4qeThrS0hEgCdScLnCrSVUhqu3CQhFQVMp6K0,269
|
../../../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,,
|
||||||
|
@ -1 +1 @@
|
|||||||
{"last_check":"2019-11-19T13:10:17Z","pypi_version":"19.3.1"}
|
{"last_check":"2019-11-05T13:22:52Z","pypi_version":"19.3.1"}
|
Loading…
x
Reference in New Issue
Block a user