From 80b74642b6a6a375462d6eae7efb203981a412d6 Mon Sep 17 00:00:00 2001 From: Radek Czajka Date: Wed, 3 Apr 2019 12:37:47 +0200 Subject: [PATCH] Rearrange source. --- Makefile | 6 +++--- manage.py | 15 --------------- {apps/edition1 => src/core}/__init__.py | 0 .../core}/localsettings.py.template | 4 ---- {turniej => src/core}/settings.py | 2 +- {turniej => src/core}/static/img/cc.png | Bin {turniej => src/core}/static/img/di.png | Bin {turniej => src/core}/static/img/favicon.ico | Bin {turniej => src/core}/static/img/fnp.png | Bin .../core}/static/img/fnp_black.png | Bin {turniej => src/core}/static/img/koed.png | Bin {turniej => src/core}/static/img/lempl.png | Bin .../core}/static/img/social/bigfacebook.png | Bin .../core}/static/img/social/biggoogle.png | Bin .../core}/static/img/social/bignk.png | Bin .../core}/static/img/social/bigtwitter.png | Bin .../core}/static/img/social/facebook.png | Bin .../core}/static/img/social/google.png | Bin .../core}/static/img/social/nk.png | Bin .../core}/static/img/social/twitter.png | Bin .../core}/static/img/turniej-maly.png | Bin {turniej => src/core}/static/img/turniej.png | Bin {turniej => src/core}/static/img/wl.png | Bin {turniej => src/core}/static/img/wl_black.png | Bin .../core}/static/js/jquery.countdown-pl.js | 0 .../core}/static/js/jquery.countdown.css | 0 .../core}/static/js/jquery.countdown.min.js | 0 {turniej => src/core}/templates/404.html | 0 {turniej => src/core}/templates/500.html | 0 {turniej => src/core}/templates/base.html | 0 {turniej => src/core}/urls.py | 0 src/core/wsgi.py | 9 +++++++++ {apps/edition2 => src/edition1}/__init__.py | 0 {apps => src}/edition1/static/edition1/bg.png | Bin .../edition1/static/edition1/style.css | 0 .../edition1/templates/edition1/base.html | 0 .../edition1/templates/edition1/home.html | 0 .../edition1/templates/edition1/more.html | 0 .../edition1/templates/edition1/rules.html | 0 .../templates/edition1/technical.html | 0 {apps => src}/edition1/urls.py | 0 {apps => src}/edition1/views.py | 0 {apps/poetry => src/edition2}/__init__.py | 0 .../edition2/static/edition2/style.css | 0 .../edition2/templates/edition2/base.html | 0 .../edition2/templates/edition2/home.html | 0 .../edition2/templates/edition2/more.html | 0 .../edition2/templates/edition2/rules.html | 0 .../templates/edition2/technical.html | 0 {apps => src}/edition2/urls.py | 0 src/manage.py | 11 +++++++++++ .../migrations => src/poetry}/__init__.py | 0 .../poetry/migrations/0001_initial.py | 0 .../poetry/migrations}/__init__.py | 0 {apps => src}/poetry/models.py | 0 {apps => src}/poetry/static/poetry/poem.css | 0 .../poetry/templates/poetry/contest.html | 0 .../poetry/templates/poetry/main.html | 0 .../poetry/templates/poetry/poem.html | 0 .../poetry/templates/poetry/poet.html | 0 {apps => src}/poetry/urls.py | 0 {apps => src}/poetry/utils.py | 0 {apps => src}/poetry/views.py | 0 turniej/wsgi.py | 18 ------------------ 64 files changed, 24 insertions(+), 41 deletions(-) delete mode 100755 manage.py rename {apps/edition1 => src/core}/__init__.py (100%) rename {turniej => src/core}/localsettings.py.template (85%) rename {turniej => src/core}/settings.py (99%) rename {turniej => src/core}/static/img/cc.png (100%) rename {turniej => src/core}/static/img/di.png (100%) rename {turniej => src/core}/static/img/favicon.ico (100%) rename {turniej => src/core}/static/img/fnp.png (100%) rename {turniej => src/core}/static/img/fnp_black.png (100%) rename {turniej => src/core}/static/img/koed.png (100%) rename {turniej => src/core}/static/img/lempl.png (100%) rename {turniej => src/core}/static/img/social/bigfacebook.png (100%) rename {turniej => src/core}/static/img/social/biggoogle.png (100%) rename {turniej => src/core}/static/img/social/bignk.png (100%) rename {turniej => src/core}/static/img/social/bigtwitter.png (100%) rename {turniej => src/core}/static/img/social/facebook.png (100%) rename {turniej => src/core}/static/img/social/google.png (100%) rename {turniej => src/core}/static/img/social/nk.png (100%) rename {turniej => src/core}/static/img/social/twitter.png (100%) rename {turniej => src/core}/static/img/turniej-maly.png (100%) rename {turniej => src/core}/static/img/turniej.png (100%) rename {turniej => src/core}/static/img/wl.png (100%) rename {turniej => src/core}/static/img/wl_black.png (100%) rename {turniej => src/core}/static/js/jquery.countdown-pl.js (100%) rename {turniej => src/core}/static/js/jquery.countdown.css (100%) rename {turniej => src/core}/static/js/jquery.countdown.min.js (100%) rename {turniej => src/core}/templates/404.html (100%) rename {turniej => src/core}/templates/500.html (100%) rename {turniej => src/core}/templates/base.html (100%) rename {turniej => src/core}/urls.py (100%) create mode 100644 src/core/wsgi.py rename {apps/edition2 => src/edition1}/__init__.py (100%) rename {apps => src}/edition1/static/edition1/bg.png (100%) rename {apps => src}/edition1/static/edition1/style.css (100%) rename {apps => src}/edition1/templates/edition1/base.html (100%) rename {apps => src}/edition1/templates/edition1/home.html (100%) rename {apps => src}/edition1/templates/edition1/more.html (100%) rename {apps => src}/edition1/templates/edition1/rules.html (100%) rename {apps => src}/edition1/templates/edition1/technical.html (100%) rename {apps => src}/edition1/urls.py (100%) rename {apps => src}/edition1/views.py (100%) rename {apps/poetry => src/edition2}/__init__.py (100%) rename {apps => src}/edition2/static/edition2/style.css (100%) rename {apps => src}/edition2/templates/edition2/base.html (100%) rename {apps => src}/edition2/templates/edition2/home.html (100%) rename {apps => src}/edition2/templates/edition2/more.html (100%) rename {apps => src}/edition2/templates/edition2/rules.html (100%) rename {apps => src}/edition2/templates/edition2/technical.html (100%) rename {apps => src}/edition2/urls.py (100%) create mode 100755 src/manage.py rename {apps/poetry/migrations => src/poetry}/__init__.py (100%) rename {apps => src}/poetry/migrations/0001_initial.py (100%) rename {turniej => src/poetry/migrations}/__init__.py (100%) rename {apps => src}/poetry/models.py (100%) rename {apps => src}/poetry/static/poetry/poem.css (100%) rename {apps => src}/poetry/templates/poetry/contest.html (100%) rename {apps => src}/poetry/templates/poetry/main.html (100%) rename {apps => src}/poetry/templates/poetry/poem.html (100%) rename {apps => src}/poetry/templates/poetry/poet.html (100%) rename {apps => src}/poetry/urls.py (100%) rename {apps => src}/poetry/utils.py (100%) rename {apps => src}/poetry/views.py (100%) delete mode 100644 turniej/wsgi.py diff --git a/Makefile b/Makefile index 434b784..ea5beb0 100644 --- a/Makefile +++ b/Makefile @@ -1,7 +1,7 @@ .PHONY: deploy -deploy: turniej/localsettings.py +deploy: src/core/localsettings.py pip install -r requirements.txt - ./manage.py migrate --noinput - ./manage.py collectstatic --noinput + src/manage.py migrate --noinput + src/manage.py collectstatic --noinput diff --git a/manage.py b/manage.py deleted file mode 100755 index 0984221..0000000 --- a/manage.py +++ /dev/null @@ -1,15 +0,0 @@ -#!/usr/bin/env python -import os -import sys - -ROOT = os.path.dirname(os.path.abspath(__file__)) -sys.path = [ - os.path.join(ROOT, 'apps'), -] + sys.path - -if __name__ == "__main__": - os.environ.setdefault("DJANGO_SETTINGS_MODULE", "turniej.settings") - - from django.core.management import execute_from_command_line - - execute_from_command_line(sys.argv) diff --git a/apps/edition1/__init__.py b/src/core/__init__.py similarity index 100% rename from apps/edition1/__init__.py rename to src/core/__init__.py diff --git a/turniej/localsettings.py.template b/src/core/localsettings.py.template similarity index 85% rename from turniej/localsettings.py.template rename to src/core/localsettings.py.template index 3765080..4345fcd 100644 --- a/turniej/localsettings.py.template +++ b/src/core/localsettings.py.template @@ -1,7 +1,3 @@ -# This template is uploaded by `fab setup`. -# You should fill out the details in the version deployed on the server. - - ADMINS = ( #('Name', 'E-mail'), ) diff --git a/turniej/settings.py b/src/core/settings.py similarity index 99% rename from turniej/settings.py rename to src/core/settings.py index 03e2586..37976da 100644 --- a/turniej/settings.py +++ b/src/core/settings.py @@ -110,7 +110,7 @@ MIDDLEWARE = [ 'django.middleware.common.CommonMiddleware', ] -ROOT_URLCONF = 'turniej.urls' +ROOT_URLCONF = 'core.urls' INSTALLED_APPS = [ 'django.contrib.sites', diff --git a/turniej/static/img/cc.png b/src/core/static/img/cc.png similarity index 100% rename from turniej/static/img/cc.png rename to src/core/static/img/cc.png diff --git a/turniej/static/img/di.png b/src/core/static/img/di.png similarity index 100% rename from turniej/static/img/di.png rename to src/core/static/img/di.png diff --git a/turniej/static/img/favicon.ico b/src/core/static/img/favicon.ico similarity index 100% rename from turniej/static/img/favicon.ico rename to src/core/static/img/favicon.ico diff --git a/turniej/static/img/fnp.png b/src/core/static/img/fnp.png similarity index 100% rename from turniej/static/img/fnp.png rename to src/core/static/img/fnp.png diff --git a/turniej/static/img/fnp_black.png b/src/core/static/img/fnp_black.png similarity index 100% rename from turniej/static/img/fnp_black.png rename to src/core/static/img/fnp_black.png diff --git a/turniej/static/img/koed.png b/src/core/static/img/koed.png similarity index 100% rename from turniej/static/img/koed.png rename to src/core/static/img/koed.png diff --git a/turniej/static/img/lempl.png b/src/core/static/img/lempl.png similarity index 100% rename from turniej/static/img/lempl.png rename to src/core/static/img/lempl.png diff --git a/turniej/static/img/social/bigfacebook.png b/src/core/static/img/social/bigfacebook.png similarity index 100% rename from turniej/static/img/social/bigfacebook.png rename to src/core/static/img/social/bigfacebook.png diff --git a/turniej/static/img/social/biggoogle.png b/src/core/static/img/social/biggoogle.png similarity index 100% rename from turniej/static/img/social/biggoogle.png rename to src/core/static/img/social/biggoogle.png diff --git a/turniej/static/img/social/bignk.png b/src/core/static/img/social/bignk.png similarity index 100% rename from turniej/static/img/social/bignk.png rename to src/core/static/img/social/bignk.png diff --git a/turniej/static/img/social/bigtwitter.png b/src/core/static/img/social/bigtwitter.png similarity index 100% rename from turniej/static/img/social/bigtwitter.png rename to src/core/static/img/social/bigtwitter.png diff --git a/turniej/static/img/social/facebook.png b/src/core/static/img/social/facebook.png similarity index 100% rename from turniej/static/img/social/facebook.png rename to src/core/static/img/social/facebook.png diff --git a/turniej/static/img/social/google.png b/src/core/static/img/social/google.png similarity index 100% rename from turniej/static/img/social/google.png rename to src/core/static/img/social/google.png diff --git a/turniej/static/img/social/nk.png b/src/core/static/img/social/nk.png similarity index 100% rename from turniej/static/img/social/nk.png rename to src/core/static/img/social/nk.png diff --git a/turniej/static/img/social/twitter.png b/src/core/static/img/social/twitter.png similarity index 100% rename from turniej/static/img/social/twitter.png rename to src/core/static/img/social/twitter.png diff --git a/turniej/static/img/turniej-maly.png b/src/core/static/img/turniej-maly.png similarity index 100% rename from turniej/static/img/turniej-maly.png rename to src/core/static/img/turniej-maly.png diff --git a/turniej/static/img/turniej.png b/src/core/static/img/turniej.png similarity index 100% rename from turniej/static/img/turniej.png rename to src/core/static/img/turniej.png diff --git a/turniej/static/img/wl.png b/src/core/static/img/wl.png similarity index 100% rename from turniej/static/img/wl.png rename to src/core/static/img/wl.png diff --git a/turniej/static/img/wl_black.png b/src/core/static/img/wl_black.png similarity index 100% rename from turniej/static/img/wl_black.png rename to src/core/static/img/wl_black.png diff --git a/turniej/static/js/jquery.countdown-pl.js b/src/core/static/js/jquery.countdown-pl.js similarity index 100% rename from turniej/static/js/jquery.countdown-pl.js rename to src/core/static/js/jquery.countdown-pl.js diff --git a/turniej/static/js/jquery.countdown.css b/src/core/static/js/jquery.countdown.css similarity index 100% rename from turniej/static/js/jquery.countdown.css rename to src/core/static/js/jquery.countdown.css diff --git a/turniej/static/js/jquery.countdown.min.js b/src/core/static/js/jquery.countdown.min.js similarity index 100% rename from turniej/static/js/jquery.countdown.min.js rename to src/core/static/js/jquery.countdown.min.js diff --git a/turniej/templates/404.html b/src/core/templates/404.html similarity index 100% rename from turniej/templates/404.html rename to src/core/templates/404.html diff --git a/turniej/templates/500.html b/src/core/templates/500.html similarity index 100% rename from turniej/templates/500.html rename to src/core/templates/500.html diff --git a/turniej/templates/base.html b/src/core/templates/base.html similarity index 100% rename from turniej/templates/base.html rename to src/core/templates/base.html diff --git a/turniej/urls.py b/src/core/urls.py similarity index 100% rename from turniej/urls.py rename to src/core/urls.py diff --git a/src/core/wsgi.py b/src/core/wsgi.py new file mode 100644 index 0000000..b580220 --- /dev/null +++ b/src/core/wsgi.py @@ -0,0 +1,9 @@ +import os + + +os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") + +# This application object is used by the development server +# as well as any WSGI server configured to use this file. +from django.core.wsgi import get_wsgi_application +application = get_wsgi_application() diff --git a/apps/edition2/__init__.py b/src/edition1/__init__.py similarity index 100% rename from apps/edition2/__init__.py rename to src/edition1/__init__.py diff --git a/apps/edition1/static/edition1/bg.png b/src/edition1/static/edition1/bg.png similarity index 100% rename from apps/edition1/static/edition1/bg.png rename to src/edition1/static/edition1/bg.png diff --git a/apps/edition1/static/edition1/style.css b/src/edition1/static/edition1/style.css similarity index 100% rename from apps/edition1/static/edition1/style.css rename to src/edition1/static/edition1/style.css diff --git a/apps/edition1/templates/edition1/base.html b/src/edition1/templates/edition1/base.html similarity index 100% rename from apps/edition1/templates/edition1/base.html rename to src/edition1/templates/edition1/base.html diff --git a/apps/edition1/templates/edition1/home.html b/src/edition1/templates/edition1/home.html similarity index 100% rename from apps/edition1/templates/edition1/home.html rename to src/edition1/templates/edition1/home.html diff --git a/apps/edition1/templates/edition1/more.html b/src/edition1/templates/edition1/more.html similarity index 100% rename from apps/edition1/templates/edition1/more.html rename to src/edition1/templates/edition1/more.html diff --git a/apps/edition1/templates/edition1/rules.html b/src/edition1/templates/edition1/rules.html similarity index 100% rename from apps/edition1/templates/edition1/rules.html rename to src/edition1/templates/edition1/rules.html diff --git a/apps/edition1/templates/edition1/technical.html b/src/edition1/templates/edition1/technical.html similarity index 100% rename from apps/edition1/templates/edition1/technical.html rename to src/edition1/templates/edition1/technical.html diff --git a/apps/edition1/urls.py b/src/edition1/urls.py similarity index 100% rename from apps/edition1/urls.py rename to src/edition1/urls.py diff --git a/apps/edition1/views.py b/src/edition1/views.py similarity index 100% rename from apps/edition1/views.py rename to src/edition1/views.py diff --git a/apps/poetry/__init__.py b/src/edition2/__init__.py similarity index 100% rename from apps/poetry/__init__.py rename to src/edition2/__init__.py diff --git a/apps/edition2/static/edition2/style.css b/src/edition2/static/edition2/style.css similarity index 100% rename from apps/edition2/static/edition2/style.css rename to src/edition2/static/edition2/style.css diff --git a/apps/edition2/templates/edition2/base.html b/src/edition2/templates/edition2/base.html similarity index 100% rename from apps/edition2/templates/edition2/base.html rename to src/edition2/templates/edition2/base.html diff --git a/apps/edition2/templates/edition2/home.html b/src/edition2/templates/edition2/home.html similarity index 100% rename from apps/edition2/templates/edition2/home.html rename to src/edition2/templates/edition2/home.html diff --git a/apps/edition2/templates/edition2/more.html b/src/edition2/templates/edition2/more.html similarity index 100% rename from apps/edition2/templates/edition2/more.html rename to src/edition2/templates/edition2/more.html diff --git a/apps/edition2/templates/edition2/rules.html b/src/edition2/templates/edition2/rules.html similarity index 100% rename from apps/edition2/templates/edition2/rules.html rename to src/edition2/templates/edition2/rules.html diff --git a/apps/edition2/templates/edition2/technical.html b/src/edition2/templates/edition2/technical.html similarity index 100% rename from apps/edition2/templates/edition2/technical.html rename to src/edition2/templates/edition2/technical.html diff --git a/apps/edition2/urls.py b/src/edition2/urls.py similarity index 100% rename from apps/edition2/urls.py rename to src/edition2/urls.py diff --git a/src/manage.py b/src/manage.py new file mode 100755 index 0000000..06d0ce2 --- /dev/null +++ b/src/manage.py @@ -0,0 +1,11 @@ +#!/usr/bin/env python +import os +import sys + + +if __name__ == "__main__": + os.environ.setdefault("DJANGO_SETTINGS_MODULE", "core.settings") + + from django.core.management import execute_from_command_line + + execute_from_command_line(sys.argv) diff --git a/apps/poetry/migrations/__init__.py b/src/poetry/__init__.py similarity index 100% rename from apps/poetry/migrations/__init__.py rename to src/poetry/__init__.py diff --git a/apps/poetry/migrations/0001_initial.py b/src/poetry/migrations/0001_initial.py similarity index 100% rename from apps/poetry/migrations/0001_initial.py rename to src/poetry/migrations/0001_initial.py diff --git a/turniej/__init__.py b/src/poetry/migrations/__init__.py similarity index 100% rename from turniej/__init__.py rename to src/poetry/migrations/__init__.py diff --git a/apps/poetry/models.py b/src/poetry/models.py similarity index 100% rename from apps/poetry/models.py rename to src/poetry/models.py diff --git a/apps/poetry/static/poetry/poem.css b/src/poetry/static/poetry/poem.css similarity index 100% rename from apps/poetry/static/poetry/poem.css rename to src/poetry/static/poetry/poem.css diff --git a/apps/poetry/templates/poetry/contest.html b/src/poetry/templates/poetry/contest.html similarity index 100% rename from apps/poetry/templates/poetry/contest.html rename to src/poetry/templates/poetry/contest.html diff --git a/apps/poetry/templates/poetry/main.html b/src/poetry/templates/poetry/main.html similarity index 100% rename from apps/poetry/templates/poetry/main.html rename to src/poetry/templates/poetry/main.html diff --git a/apps/poetry/templates/poetry/poem.html b/src/poetry/templates/poetry/poem.html similarity index 100% rename from apps/poetry/templates/poetry/poem.html rename to src/poetry/templates/poetry/poem.html diff --git a/apps/poetry/templates/poetry/poet.html b/src/poetry/templates/poetry/poet.html similarity index 100% rename from apps/poetry/templates/poetry/poet.html rename to src/poetry/templates/poetry/poet.html diff --git a/apps/poetry/urls.py b/src/poetry/urls.py similarity index 100% rename from apps/poetry/urls.py rename to src/poetry/urls.py diff --git a/apps/poetry/utils.py b/src/poetry/utils.py similarity index 100% rename from apps/poetry/utils.py rename to src/poetry/utils.py diff --git a/apps/poetry/views.py b/src/poetry/views.py similarity index 100% rename from apps/poetry/views.py rename to src/poetry/views.py diff --git a/turniej/wsgi.py b/turniej/wsgi.py deleted file mode 100644 index f97d8fd..0000000 --- a/turniej/wsgi.py +++ /dev/null @@ -1,18 +0,0 @@ -import os -import os.path -import sys - -ROOT = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) - -# Add apps and lib directories to PYTHONPATH -sys.path = [ - os.path.join(ROOT, 'apps'), -] + sys.path - - -os.environ.setdefault("DJANGO_SETTINGS_MODULE", "turniej.settings") - -# This application object is used by the development server -# as well as any WSGI server configured to use this file. -from django.core.wsgi import get_wsgi_application -application = get_wsgi_application() -- 2.20.1