Browse Source

zacatek stranka + úpravy

master
petr 5 years ago
parent
commit
7e01b2914b
  1. 132
      .gitignore
  2. BIN
      db.sqlite3
  3. BIN
      home/__pycache__/__init__.cpython-38.pyc
  4. BIN
      home/__pycache__/models.cpython-38.pyc
  5. BIN
      home/migrations/__pycache__/0001_initial.cpython-38.pyc
  6. BIN
      home/migrations/__pycache__/0002_create_homepage.cpython-38.pyc
  7. BIN
      home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc
  8. BIN
      home/migrations/__pycache__/__init__.cpython-38.pyc
  9. BIN
      search/__pycache__/__init__.cpython-38.pyc
  10. BIN
      search/__pycache__/views.cpython-38.pyc
  11. 0
      stranky/__init__.py
  12. 3
      stranky/admin.py
  13. 5
      stranky/apps.py
  14. 44
      stranky/migrations/0001_initial.py
  15. 0
      stranky/migrations/__init__.py
  16. 6
      stranky/models.py
  17. 3
      stranky/tests.py
  18. 3
      stranky/views.py
  19. BIN
      ubytovani/__pycache__/__init__.cpython-38.pyc
  20. BIN
      ubytovani/__pycache__/urls.cpython-38.pyc
  21. BIN
      ubytovani/__pycache__/wsgi.cpython-38.pyc
  22. BIN
      ubytovani/settings/__pycache__/__init__.cpython-38.pyc
  23. BIN
      ubytovani/settings/__pycache__/base.cpython-38.pyc
  24. BIN
      ubytovani/settings/__pycache__/dev.cpython-38.pyc
  25. 31
      ubytovani/settings/base.py

132
.gitignore

@ -0,0 +1,132 @@
# ---> Python
# Byte-compiled / optimized / DLL files
__pycache__/
*.py[cod]
*$py.class
# C extensions
*.so
# Distribution / packaging
.Python
build/
develop-eggs/
dist/
downloads/
eggs/
.eggs/
lib/
lib64/
parts/
sdist/
var/
wheels/
pip-wheel-metadata/
share/python-wheels/
*.egg-info/
.installed.cfg
*.egg
MANIFEST
# 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/
.nox/
.coverage
.coverage.*
.cache
nosetests.xml
coverage.xml
*.cover
*.py,cover
.hypothesis/
.pytest_cache/
# Translations
*.mo
*.pot
# Django stuff:
*.log
local_settings.py
db.sqlite3
db.sqlite3-journal
# Flask stuff:
instance/
.webassets-cache
# Scrapy stuff:
.scrapy
# Sphinx documentation
docs/_build/
# PyBuilder
target/
# Jupyter Notebook
.ipynb_checkpoints
# IPython
profile_default/
ipython_config.py
# pyenv
.python-version
# pipenv
# According to pypa/pipenv#598, it is recommended to include Pipfile.lock in version control.
# However, in case of collaboration, if having platform-specific dependencies or dependencies
# having no cross-platform support, pipenv may install dependencies that don't work, or not
# install all needed dependencies.
#Pipfile.lock
# PEP 582; used by e.g. github.com/David-OConnor/pyflow
__pypackages__/
# Celery stuff
celerybeat-schedule
celerybeat.pid
# SageMath parsed files
*.sage.py
# Environments
.env
.venv
env/
venv/
ENV/
env.bak/
venv.bak/
# Spyder project settings
.spyderproject
.spyproject
# Rope project settings
.ropeproject
# mkdocs documentation
/site
# mypy
.mypy_cache/
.dmypy.json
dmypy.json
# Pyre type checker
.pyre/
media/

BIN
db.sqlite3

Binary file not shown.

BIN
home/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
home/__pycache__/models.cpython-38.pyc

Binary file not shown.

BIN
home/migrations/__pycache__/0001_initial.cpython-38.pyc

Binary file not shown.

BIN
home/migrations/__pycache__/0002_create_homepage.cpython-38.pyc

Binary file not shown.

BIN
home/migrations/__pycache__/0003_homepage_body.cpython-38.pyc

Binary file not shown.

BIN
home/migrations/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
search/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
search/__pycache__/views.cpython-38.pyc

Binary file not shown.

0
stranky/__init__.py

3
stranky/admin.py

@ -0,0 +1,3 @@
from django.contrib import admin
# Register your models here.

5
stranky/apps.py

@ -0,0 +1,5 @@
from django.apps import AppConfig
class StrankyConfig(AppConfig):
name = 'stranky'

44
stranky/migrations/0001_initial.py

@ -0,0 +1,44 @@
# Generated by Django 3.1.3 on 2020-11-23 13:41
from django.db import migrations, models
import django.db.models.deletion
import modelcluster.fields
import wagtail.core.fields
class Migration(migrations.Migration):
initial = True
dependencies = [
('wagtailimages', '0022_uploadedimage'),
('wagtailcore', '0059_apply_collection_ordering'),
]
operations = [
migrations.CreateModel(
name='StrankyPage',
fields=[
('page_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='wagtailcore.page')),
('body', wagtail.core.fields.RichTextField(blank=True)),
],
options={
'abstract': False,
},
bases=('wagtailcore.page',),
),
migrations.CreateModel(
name='StrankyPageGalleryImage',
fields=[
('id', models.AutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),
('sort_order', models.IntegerField(blank=True, editable=False, null=True)),
('caption', models.CharField(blank=True, max_length=250)),
('image', models.ForeignKey(on_delete=django.db.models.deletion.CASCADE, related_name='+', to='wagtailimages.image')),
('page', modelcluster.fields.ParentalKey(on_delete=django.db.models.deletion.CASCADE, related_name='gallery_images', to='stranky.strankypage')),
],
options={
'ordering': ['sort_order'],
'abstract': False,
},
),
]

0
stranky/migrations/__init__.py

6
stranka/models.py → stranky/models.py

@ -9,7 +9,7 @@ from wagtail.images.edit_handlers import ImageChooserPanel
from wagtail.search import index
class StrankaPage(Page):
class StrankyPage(Page):
body = RichTextField(blank=True)
search_fields = Page.search_fields + [
@ -22,8 +22,8 @@ class StrankaPage(Page):
]
class StrankaPageGalleryImage(Orderable):
page = ParentalKey(StrankaPage, on_delete=models.CASCADE, related_name='gallery_images')
class StrankyPageGalleryImage(Orderable):
page = ParentalKey(StrankyPage, on_delete=models.CASCADE, related_name='gallery_images')
image = models.ForeignKey(
'wagtailimages.Image', on_delete=models.CASCADE, related_name='+'
)

3
stranky/tests.py

@ -0,0 +1,3 @@
from django.test import TestCase
# Create your tests here.

3
stranky/views.py

@ -0,0 +1,3 @@
from django.shortcuts import render
# Create your views here.

BIN
ubytovani/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
ubytovani/__pycache__/urls.cpython-38.pyc

Binary file not shown.

BIN
ubytovani/__pycache__/wsgi.cpython-38.pyc

Binary file not shown.

BIN
ubytovani/settings/__pycache__/__init__.cpython-38.pyc

Binary file not shown.

BIN
ubytovani/settings/__pycache__/base.cpython-38.pyc

Binary file not shown.

BIN
ubytovani/settings/__pycache__/dev.cpython-38.pyc

Binary file not shown.

31
ubytovani/settings/base.py

@ -48,6 +48,7 @@ INSTALLED_APPS = [
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'stranky',
]
MIDDLEWARE = [
@ -99,26 +100,26 @@ DATABASES = {
# Password validation
# https://docs.djangoproject.com/en/3.1/ref/settings/#auth-password-validators
AUTH_PASSWORD_VALIDATORS = [
{
'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
},
{
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
# AUTH_PASSWORD_VALIDATORS = [
# {
# 'NAME': 'django.contrib.auth.password_validation.UserAttributeSimilarityValidator',
# },
# {
# 'NAME': 'django.contrib.auth.password_validation.MinimumLengthValidator',
# },
# {
# 'NAME': 'django.contrib.auth.password_validation.CommonPasswordValidator',
# },
# {
# 'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
# },
# ]
# Internationalization
# https://docs.djangoproject.com/en/3.1/topics/i18n/
LANGUAGE_CODE = 'en-us'
LANGUAGE_CODE = 'cs'
TIME_ZONE = 'UTC'

Loading…
Cancel
Save