diff --git a/pflaenzli/.gitignore b/pflaenzli/.gitignore new file mode 100644 index 0000000..ef242fd --- /dev/null +++ b/pflaenzli/.gitignore @@ -0,0 +1,207 @@ +# Created by https://www.toptal.com/developers/gitignore/api/django,macos +# Edit at https://www.toptal.com/developers/gitignore?templates=django,macos + +### Django ### +*.log +*.pot +*.pyc +__pycache__/ +local_settings.py +db.sqlite3 +db.sqlite3-journal +media + +# If your build process includes running collectstatic, then you probably don't need or want to include staticfiles/ +# in your Git repository. Update and uncomment the following line accordingly. +# /staticfiles/ + +### Django.Python Stack ### +# Byte-compiled / optimized / DLL files +*.py[cod] +*$py.class + +# C extensions +*.so + +# Distribution / packaging +.Python +build/ +develop-eggs/ +dist/ +downloads/ +eggs/ +.eggs/ +lib/ +lib64/ +parts/ +sdist/ +var/ +wheels/ +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/ +cover/ + +# Translations +*.mo + +# Django stuff: + +# Flask stuff: +instance/ +.webassets-cache + +# Scrapy stuff: +.scrapy + +# Sphinx documentation +docs/_build/ + +# PyBuilder +.pybuilder/ +target/ + +# Jupyter Notebook +.ipynb_checkpoints + +# IPython +profile_default/ +ipython_config.py + +# pyenv +# For a library or package, you might want to ignore these files since the code is +# intended to run in multiple environments; otherwise, check them in: +# .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 + +# poetry +# Similar to Pipfile.lock, it is generally recommended to include poetry.lock in version control. +# This is especially recommended for binary packages to ensure reproducibility, and is more +# commonly ignored for libraries. +# https://python-poetry.org/docs/basic-usage/#commit-your-poetrylock-file-to-version-control +#poetry.lock + +# pdm +# Similar to Pipfile.lock, it is generally recommended to include pdm.lock in version control. +#pdm.lock +# pdm stores project-wide configurations in .pdm.toml, but it is recommended to not include it +# in version control. +# https://pdm.fming.dev/#use-with-ide +.pdm.toml + +# PEP 582; used by e.g. github.com/David-OConnor/pyflow and github.com/pdm-project/pdm +__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/ + +# pytype static type analyzer +.pytype/ + +# Cython debug symbols +cython_debug/ + +# PyCharm +# JetBrains specific template is maintained in a separate JetBrains.gitignore that can +# be found at https://github.com/github/gitignore/blob/main/Global/JetBrains.gitignore +# and can be added to the global gitignore or merged into this file. For a more nuclear +# option (not recommended) you can uncomment the following to ignore the entire idea folder. +#.idea/ + +### macOS ### +# General +.DS_Store +.AppleDouble +.LSOverride + +# Icon must end with two \r +Icon + + +# Thumbnails +._* + +# Files that might appear in the root of a volume +.DocumentRevisions-V100 +.fseventsd +.Spotlight-V100 +.TemporaryItems +.Trashes +.VolumeIcon.icns +.com.apple.timemachine.donotpresent + +# Directories potentially created on remote AFP share +.AppleDB +.AppleDesktop +Network Trash Folder +Temporary Items +.apdisk + +### macOS Patch ### +# iCloud generated files +*.icloud + +# End of https://www.toptal.com/developers/gitignore/api/django,macos diff --git a/manage.py b/pflaenzli/manage.py similarity index 100% rename from manage.py rename to pflaenzli/manage.py diff --git a/pflaenzli/__init__.py b/pflaenzli/pflaenzli/__init__.py similarity index 100% rename from pflaenzli/__init__.py rename to pflaenzli/pflaenzli/__init__.py diff --git a/pflaenzli/admin.py b/pflaenzli/pflaenzli/admin.py similarity index 100% rename from pflaenzli/admin.py rename to pflaenzli/pflaenzli/admin.py diff --git a/pflaenzli/apps.py b/pflaenzli/pflaenzli/apps.py similarity index 100% rename from pflaenzli/apps.py rename to pflaenzli/pflaenzli/apps.py diff --git a/pflaenzli/forms.py b/pflaenzli/pflaenzli/forms.py similarity index 100% rename from pflaenzli/forms.py rename to pflaenzli/pflaenzli/forms.py diff --git a/pflaenzli/mail.py b/pflaenzli/pflaenzli/mail.py similarity index 100% rename from pflaenzli/mail.py rename to pflaenzli/pflaenzli/mail.py diff --git a/pflaenzli/migrations/0001_initial.py b/pflaenzli/pflaenzli/migrations/0001_initial.py similarity index 100% rename from pflaenzli/migrations/0001_initial.py rename to pflaenzli/pflaenzli/migrations/0001_initial.py diff --git a/pflaenzli/migrations/0002_offer_created_wish.py b/pflaenzli/pflaenzli/migrations/0002_offer_created_wish.py similarity index 100% rename from pflaenzli/migrations/0002_offer_created_wish.py rename to pflaenzli/pflaenzli/migrations/0002_offer_created_wish.py diff --git a/pflaenzli/migrations/0003_offer_image.py b/pflaenzli/pflaenzli/migrations/0003_offer_image.py similarity index 100% rename from pflaenzli/migrations/0003_offer_image.py rename to pflaenzli/pflaenzli/migrations/0003_offer_image.py diff --git a/pflaenzli/migrations/__init__.py b/pflaenzli/pflaenzli/migrations/__init__.py similarity index 100% rename from pflaenzli/migrations/__init__.py rename to pflaenzli/pflaenzli/migrations/__init__.py diff --git a/pflaenzli/models.py b/pflaenzli/pflaenzli/models.py similarity index 100% rename from pflaenzli/models.py rename to pflaenzli/pflaenzli/models.py diff --git a/pflaenzli/static/base.css b/pflaenzli/pflaenzli/static/base.css similarity index 100% rename from pflaenzli/static/base.css rename to pflaenzli/pflaenzli/static/base.css diff --git a/pflaenzli/static/bootstrap-color-toggler.js b/pflaenzli/pflaenzli/static/bootstrap-color-toggler.js similarity index 100% rename from pflaenzli/static/bootstrap-color-toggler.js rename to pflaenzli/pflaenzli/static/bootstrap-color-toggler.js diff --git a/pflaenzli/static/home.jpg b/pflaenzli/pflaenzli/static/home.jpg similarity index 100% rename from pflaenzli/static/home.jpg rename to pflaenzli/pflaenzli/static/home.jpg diff --git a/pflaenzli/static/home.webp b/pflaenzli/pflaenzli/static/home.webp similarity index 100% rename from pflaenzli/static/home.webp rename to pflaenzli/pflaenzli/static/home.webp diff --git a/pflaenzli/static/home2.jpg b/pflaenzli/pflaenzli/static/home2.jpg similarity index 100% rename from pflaenzli/static/home2.jpg rename to pflaenzli/pflaenzli/static/home2.jpg diff --git a/pflaenzli/static/home3.jpg b/pflaenzli/pflaenzli/static/home3.jpg similarity index 100% rename from pflaenzli/static/home3.jpg rename to pflaenzli/pflaenzli/static/home3.jpg diff --git a/pflaenzli/static/home4.jpg b/pflaenzli/pflaenzli/static/home4.jpg similarity index 100% rename from pflaenzli/static/home4.jpg rename to pflaenzli/pflaenzli/static/home4.jpg diff --git a/pflaenzli/pflaenzli/static/placeholder.jpg b/pflaenzli/pflaenzli/static/placeholder.jpg new file mode 100644 index 0000000..9a74bb1 Binary files /dev/null and b/pflaenzli/pflaenzli/static/placeholder.jpg differ diff --git a/pflaenzli/templates/app/faq.html b/pflaenzli/pflaenzli/templates/app/faq.html similarity index 100% rename from pflaenzli/templates/app/faq.html rename to pflaenzli/pflaenzli/templates/app/faq.html diff --git a/pflaenzli/templates/app/imprint.html b/pflaenzli/pflaenzli/templates/app/imprint.html similarity index 100% rename from pflaenzli/templates/app/imprint.html rename to pflaenzli/pflaenzli/templates/app/imprint.html diff --git a/pflaenzli/templates/app/index.html b/pflaenzli/pflaenzli/templates/app/index.html similarity index 100% rename from pflaenzli/templates/app/index.html rename to pflaenzli/pflaenzli/templates/app/index.html diff --git a/pflaenzli/templates/base.html b/pflaenzli/pflaenzli/templates/base.html similarity index 100% rename from pflaenzli/templates/base.html rename to pflaenzli/pflaenzli/templates/base.html diff --git a/pflaenzli/templates/basic_form.html b/pflaenzli/pflaenzli/templates/basic_form.html similarity index 100% rename from pflaenzli/templates/basic_form.html rename to pflaenzli/pflaenzli/templates/basic_form.html diff --git a/pflaenzli/templates/offer/detail.html b/pflaenzli/pflaenzli/templates/offer/detail.html similarity index 100% rename from pflaenzli/templates/offer/detail.html rename to pflaenzli/pflaenzli/templates/offer/detail.html diff --git a/pflaenzli/templates/offer/edit.html b/pflaenzli/pflaenzli/templates/offer/edit.html similarity index 100% rename from pflaenzli/templates/offer/edit.html rename to pflaenzli/pflaenzli/templates/offer/edit.html diff --git a/pflaenzli/templates/offer/search.html b/pflaenzli/pflaenzli/templates/offer/search.html similarity index 100% rename from pflaenzli/templates/offer/search.html rename to pflaenzli/pflaenzli/templates/offer/search.html diff --git a/pflaenzli/templates/registration/confirmation_email.html b/pflaenzli/pflaenzli/templates/registration/confirmation_email.html similarity index 100% rename from pflaenzli/templates/registration/confirmation_email.html rename to pflaenzli/pflaenzli/templates/registration/confirmation_email.html diff --git a/pflaenzli/templates/registration/login.html b/pflaenzli/pflaenzli/templates/registration/login.html similarity index 100% rename from pflaenzli/templates/registration/login.html rename to pflaenzli/pflaenzli/templates/registration/login.html diff --git a/pflaenzli/templates/registration/register.html b/pflaenzli/pflaenzli/templates/registration/register.html similarity index 100% rename from pflaenzli/templates/registration/register.html rename to pflaenzli/pflaenzli/templates/registration/register.html diff --git a/pflaenzli/templates/reset_password/check_email.html.twig b/pflaenzli/pflaenzli/templates/reset_password/check_email.html.twig similarity index 100% rename from pflaenzli/templates/reset_password/check_email.html.twig rename to pflaenzli/pflaenzli/templates/reset_password/check_email.html.twig diff --git a/pflaenzli/templates/reset_password/email.html.twig b/pflaenzli/pflaenzli/templates/reset_password/email.html.twig similarity index 100% rename from pflaenzli/templates/reset_password/email.html.twig rename to pflaenzli/pflaenzli/templates/reset_password/email.html.twig diff --git a/pflaenzli/templates/reset_password/request.html.twig b/pflaenzli/pflaenzli/templates/reset_password/request.html.twig similarity index 100% rename from pflaenzli/templates/reset_password/request.html.twig rename to pflaenzli/pflaenzli/templates/reset_password/request.html.twig diff --git a/pflaenzli/templates/reset_password/reset.html.twig b/pflaenzli/pflaenzli/templates/reset_password/reset.html.twig similarity index 100% rename from pflaenzli/templates/reset_password/reset.html.twig rename to pflaenzli/pflaenzli/templates/reset_password/reset.html.twig diff --git a/pflaenzli/templates/user/detail.html b/pflaenzli/pflaenzli/templates/user/detail.html similarity index 100% rename from pflaenzli/templates/user/detail.html rename to pflaenzli/pflaenzli/templates/user/detail.html diff --git a/pflaenzli/templates/user/offers.html.twig b/pflaenzli/pflaenzli/templates/user/offers.html.twig similarity index 100% rename from pflaenzli/templates/user/offers.html.twig rename to pflaenzli/pflaenzli/templates/user/offers.html.twig diff --git a/pflaenzli/templates/user/public.html b/pflaenzli/pflaenzli/templates/user/public.html similarity index 100% rename from pflaenzli/templates/user/public.html rename to pflaenzli/pflaenzli/templates/user/public.html diff --git a/pflaenzli/templates/user/trade/offer_email.html b/pflaenzli/pflaenzli/templates/user/trade/offer_email.html similarity index 100% rename from pflaenzli/templates/user/trade/offer_email.html rename to pflaenzli/pflaenzli/templates/user/trade/offer_email.html diff --git a/pflaenzli/templates/user/wish.html.twig b/pflaenzli/pflaenzli/templates/user/wish.html.twig similarity index 100% rename from pflaenzli/templates/user/wish.html.twig rename to pflaenzli/pflaenzli/templates/user/wish.html.twig diff --git a/pflaenzli/tests.py b/pflaenzli/pflaenzli/tests.py similarity index 100% rename from pflaenzli/tests.py rename to pflaenzli/pflaenzli/tests.py diff --git a/pflaenzli/upload.py b/pflaenzli/pflaenzli/upload.py similarity index 100% rename from pflaenzli/upload.py rename to pflaenzli/pflaenzli/upload.py diff --git a/pflaenzli/urls.py b/pflaenzli/pflaenzli/urls.py similarity index 100% rename from pflaenzli/urls.py rename to pflaenzli/pflaenzli/urls.py diff --git a/pflaenzli/views.py b/pflaenzli/pflaenzli/views.py similarity index 100% rename from pflaenzli/views.py rename to pflaenzli/pflaenzli/views.py diff --git a/pflaenzli_django/__init__.py b/pflaenzli/pflaenzli_django/__init__.py similarity index 100% rename from pflaenzli_django/__init__.py rename to pflaenzli/pflaenzli_django/__init__.py diff --git a/pflaenzli_django/asgi.py b/pflaenzli/pflaenzli_django/asgi.py similarity index 100% rename from pflaenzli_django/asgi.py rename to pflaenzli/pflaenzli_django/asgi.py diff --git a/pflaenzli_django/settings.py b/pflaenzli/pflaenzli_django/settings.py similarity index 89% rename from pflaenzli_django/settings.py rename to pflaenzli/pflaenzli_django/settings.py index 4fb3346..0e31dd4 100644 --- a/pflaenzli_django/settings.py +++ b/pflaenzli/pflaenzli_django/settings.py @@ -78,13 +78,24 @@ WSGI_APPLICATION = "pflaenzli_django.wsgi.application" # Database # https://docs.djangoproject.com/en/4.1/ref/settings/#databases - -DATABASES = { - "default": { - "ENGINE": "django.db.backends.sqlite3", - "NAME": BASE_DIR / "db.sqlite3", +if os.getenv("DOCKER"): + DATABASES = { + 'default': { + 'ENGINE': 'django.db.backends.postgresql', + 'NAME': 'pflaenzli', + 'USER': 'pflaenzli', + 'PASSWORD': 'development', + 'HOST': 'db', + 'PORT': '5432', + } + } +else: + DATABASES = { + "default": { + "ENGINE": "django.db.backends.sqlite3", + "NAME": BASE_DIR / "db.sqlite3", + } } -} # Password validation diff --git a/pflaenzli_django/urls.py b/pflaenzli/pflaenzli_django/urls.py similarity index 100% rename from pflaenzli_django/urls.py rename to pflaenzli/pflaenzli_django/urls.py diff --git a/pflaenzli_django/wsgi.py b/pflaenzli/pflaenzli_django/wsgi.py similarity index 100% rename from pflaenzli_django/wsgi.py rename to pflaenzli/pflaenzli_django/wsgi.py