diff --git a/.gitignore b/.gitignore index c180445..f32b3ab 100644 --- a/.gitignore +++ b/.gitignore @@ -69,7 +69,7 @@ coverage.xml # exclude migrations from repository. These should be created locally, matching local DB requirements. # lostplaces/manage.py makemigrations && lostplaces/manage.py migrate -lostplaces/lostplaces_app/migrations/ +django_lostplaces/lostplaces/migrations/ # pyenv .python-version diff --git a/MANIFEST.in b/MANIFEST.in index 9a65a64..f888311 100644 --- a/MANIFEST.in +++ b/MANIFEST.in @@ -1,5 +1,5 @@ include LICENSE include Readme.rst include Pipfile -recursive-include lostplaces_app/static * -recursive-include lostplaces_app/templates * \ No newline at end of file +recursive-include lostplaces/static * +recursive-include lostplaces/templates * \ No newline at end of file diff --git a/Pipfile b/Pipfile index bf28c03..4248ee3 100644 --- a/Pipfile +++ b/Pipfile @@ -21,5 +21,8 @@ django-widget-tweaks = "*" django-taggit = "*" [scripts] -test = "lostplaces/manage.py test lostplaces_app" +test = "django_lostplaces/manage.py test lostplaces" +server = "django_lostplaces/manage.py runserver --ipv6" +dbshell = "django_lostplaces/manage.py dbshell" +showmigrations "django_lostplaces/manage.py showmigrations" diff --git a/Readme.md b/Readme.md index f7d5912..8f5cfed 100644 --- a/Readme.md +++ b/Readme.md @@ -75,7 +75,7 @@ Before making the django instance public, you should tweak the config `settings. Run `lostplaces/managy.py collectstatic` and you should be ready to go. -## Installing the lostplaces_app to an existing django instance +## Installing lostplaces to an existing django instance ### Installing django and the lostplaces app @@ -93,7 +93,7 @@ Now configure your `settings.py` as follows: ```python INSTALLED_APPS = [ ... - 'lostplaces_app', + 'lostplaces', 'easy_thumbnails', 'widget_tweaks', 'django_taggit' @@ -113,7 +113,7 @@ MEDIA_ROOT = os.path.join(BASE_DIR, 'uploads') 3. Set the user model (this will be changed in the next release): ```python -AUTH_USER_MODEL = 'lostplaces_app.Explorer' +AUTH_USER_MODEL = 'lostplaces.Explorer' ``` 4. Set the URL's for login, for example: @@ -131,7 +131,7 @@ urlpatterns = [ path('admin/', admin.site.urls), path('signup/', SignUpView.as_view(), name='signup'), # If you want to use lostplaces' sign up view. path('explorers/', include('django.contrib.auth.urls')), # You can change the 'explorers/' to whatever you desire. - path('', include('lostplaces_app.urls')), # In this configuration lostplaces will be at the top level of you website, change '' to 'lostplaces/', if you don't want this. + path('', include('lostplaces.urls')), # In this configuration lostplaces will be at the top level of you website, change '' to 'lostplaces/', if you don't want this. ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # So django can deliver user uploaded files. ``` diff --git a/lostplaces/lostplaces/__init__.py b/django_lostplaces/django_lostplaces/__init__.py similarity index 100% rename from lostplaces/lostplaces/__init__.py rename to django_lostplaces/django_lostplaces/__init__.py diff --git a/lostplaces/lostplaces/asgi.py b/django_lostplaces/django_lostplaces/asgi.py similarity index 82% rename from lostplaces/lostplaces/asgi.py rename to django_lostplaces/django_lostplaces/asgi.py index b15a66b..df49eab 100644 --- a/lostplaces/lostplaces/asgi.py +++ b/django_lostplaces/django_lostplaces/asgi.py @@ -14,6 +14,6 @@ import os from django.core.asgi import get_asgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings') application = get_asgi_application() diff --git a/lostplaces/lostplaces/settings.py b/django_lostplaces/django_lostplaces/settings.py similarity index 97% rename from lostplaces/lostplaces/settings.py rename to django_lostplaces/django_lostplaces/settings.py index f02ff25..2be6876 100644 --- a/lostplaces/lostplaces/settings.py +++ b/django_lostplaces/django_lostplaces/settings.py @@ -38,7 +38,7 @@ ALLOWED_HOSTS = ['localhost'] # Application definition INSTALLED_APPS = [ - 'lostplaces_app', + 'lostplaces', 'easy_thumbnails', 'widget_tweaks', 'taggit', @@ -60,7 +60,7 @@ MIDDLEWARE = [ 'django.middleware.clickjacking.XFrameOptionsMiddleware', ] -ROOT_URLCONF = 'lostplaces.urls' +ROOT_URLCONF = 'django_lostplaces.urls' TEMPLATES = [ { @@ -78,7 +78,7 @@ TEMPLATES = [ }, ] -WSGI_APPLICATION = 'lostplaces.wsgi.application' +WSGI_APPLICATION = 'django_lostplaces.wsgi.application' # Database diff --git a/lostplaces/lostplaces/urls.py b/django_lostplaces/django_lostplaces/urls.py similarity index 92% rename from lostplaces/lostplaces/urls.py rename to django_lostplaces/django_lostplaces/urls.py index c01f7b8..1382f7f 100644 --- a/lostplaces/lostplaces/urls.py +++ b/django_lostplaces/django_lostplaces/urls.py @@ -23,11 +23,11 @@ from django.conf.urls.static import static from django.urls import path, include from django.views.generic.base import TemplateView -from lostplaces_app.views import SignUpView +from lostplaces.views import SignUpView urlpatterns = [ path('admin/', admin.site.urls), path('signup/', SignUpView.as_view(), name='signup'), path('explorers/', include('django.contrib.auth.urls')), - path('', include('lostplaces_app.urls')), + path('', include('lostplaces.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) diff --git a/lostplaces/lostplaces/wsgi.py b/django_lostplaces/django_lostplaces/wsgi.py similarity index 82% rename from lostplaces/lostplaces/wsgi.py rename to django_lostplaces/django_lostplaces/wsgi.py index fe661f9..4847f98 100644 --- a/lostplaces/lostplaces/wsgi.py +++ b/django_lostplaces/django_lostplaces/wsgi.py @@ -14,6 +14,6 @@ import os from django.core.wsgi import get_wsgi_application -os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings') +os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings') application = get_wsgi_application() diff --git a/lostplaces/lostplaces_app/__init__.py b/django_lostplaces/lostplaces/__init__.py similarity index 100% rename from lostplaces/lostplaces_app/__init__.py rename to django_lostplaces/lostplaces/__init__.py diff --git a/lostplaces/lostplaces_app/admin.py b/django_lostplaces/lostplaces/admin.py similarity index 83% rename from lostplaces/lostplaces_app/admin.py rename to django_lostplaces/lostplaces/admin.py index dc52e86..338bf8a 100644 --- a/lostplaces/lostplaces_app/admin.py +++ b/django_lostplaces/lostplaces/admin.py @@ -6,9 +6,9 @@ from django.contrib import admin from django.contrib.auth import get_user_model from django.contrib.auth.admin import UserAdmin -from lostplaces_app.models import * +from lostplaces.models import * -from lostplaces_app.forms import ExplorerCreationForm, ExplorerChangeForm +from lostplaces.forms import ExplorerCreationForm, ExplorerChangeForm # Register your models here. diff --git a/lostplaces/lostplaces_app/apps.py b/django_lostplaces/lostplaces/apps.py similarity index 72% rename from lostplaces/lostplaces_app/apps.py rename to django_lostplaces/lostplaces/apps.py index 706205b..7b6de1a 100644 --- a/lostplaces/lostplaces_app/apps.py +++ b/django_lostplaces/lostplaces/apps.py @@ -1,4 +1,4 @@ from django.apps import AppConfig class LostplacesAppConfig(AppConfig): - name = 'lostplaces_app' + name = 'lostplaces' diff --git a/lostplaces/lostplaces_app/forms.py b/django_lostplaces/lostplaces/forms.py similarity index 96% rename from lostplaces/lostplaces_app/forms.py rename to django_lostplaces/lostplaces/forms.py index 2b3f178..86f291c 100644 --- a/lostplaces/lostplaces_app/forms.py +++ b/django_lostplaces/lostplaces/forms.py @@ -6,7 +6,7 @@ from django import forms from django.contrib.auth.forms import UserCreationForm, UserChangeForm from django.contrib.auth.models import User -from lostplaces_app.models import Place, PlaceImage, Voucher +from lostplaces.models import Place, PlaceImage, Voucher class ExplorerCreationForm(UserCreationForm): class Meta: diff --git a/lostplaces/lostplaces_app/models.py b/django_lostplaces/lostplaces/models.py similarity index 100% rename from lostplaces/lostplaces_app/models.py rename to django_lostplaces/lostplaces/models.py diff --git a/lostplaces/lostplaces_app/static/favicon.ico b/django_lostplaces/lostplaces/static/favicon.ico similarity index 100% rename from lostplaces/lostplaces_app/static/favicon.ico rename to django_lostplaces/lostplaces/static/favicon.ico diff --git a/lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Bold.ttf b/django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Bold.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Bold.ttf rename to django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Bold.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Italic.ttf b/django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Italic.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Italic.ttf rename to django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Italic.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Regular.ttf b/django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Regular.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Crimson/CrimsonText-Regular.ttf rename to django_lostplaces/lostplaces/static/fonts/Crimson/CrimsonText-Regular.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Bold.ttf b/django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Bold.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Bold.ttf rename to django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Bold.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Italic.ttf b/django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Italic.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Italic.ttf rename to django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Italic.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Regular.ttf b/django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Regular.ttf similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/Montserrat/Montserrat-Regular.ttf rename to django_lostplaces/lostplaces/static/fonts/Montserrat/Montserrat-Regular.ttf diff --git a/lostplaces/lostplaces_app/static/fonts/OFL.txt b/django_lostplaces/lostplaces/static/fonts/OFL.txt similarity index 100% rename from lostplaces/lostplaces_app/static/fonts/OFL.txt rename to django_lostplaces/lostplaces/static/fonts/OFL.txt diff --git a/lostplaces/lostplaces_app/static/icons/cancel.svg b/django_lostplaces/lostplaces/static/icons/cancel.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/cancel.svg rename to django_lostplaces/lostplaces/static/icons/cancel.svg diff --git a/lostplaces/lostplaces_app/static/icons/debug.png b/django_lostplaces/lostplaces/static/icons/debug.png similarity index 100% rename from lostplaces/lostplaces_app/static/icons/debug.png rename to django_lostplaces/lostplaces/static/icons/debug.png diff --git a/lostplaces/lostplaces_app/static/icons/delete.svg b/django_lostplaces/lostplaces/static/icons/delete.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/delete.svg rename to django_lostplaces/lostplaces/static/icons/delete.svg diff --git a/lostplaces/lostplaces_app/static/icons/error.png b/django_lostplaces/lostplaces/static/icons/error.png similarity index 100% rename from lostplaces/lostplaces_app/static/icons/error.png rename to django_lostplaces/lostplaces/static/icons/error.png diff --git a/lostplaces/lostplaces_app/static/icons/favourite.svg b/django_lostplaces/lostplaces/static/icons/favourite.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/favourite.svg rename to django_lostplaces/lostplaces/static/icons/favourite.svg diff --git a/lostplaces/lostplaces_app/static/icons/flag.svg b/django_lostplaces/lostplaces/static/icons/flag.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/flag.svg rename to django_lostplaces/lostplaces/static/icons/flag.svg diff --git a/lostplaces/lostplaces_app/static/icons/hamburger_menu.svg b/django_lostplaces/lostplaces/static/icons/hamburger_menu.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/hamburger_menu.svg rename to django_lostplaces/lostplaces/static/icons/hamburger_menu.svg diff --git a/lostplaces/lostplaces_app/static/icons/icons.icomoon.json b/django_lostplaces/lostplaces/static/icons/icons.icomoon.json similarity index 100% rename from lostplaces/lostplaces_app/static/icons/icons.icomoon.json rename to django_lostplaces/lostplaces/static/icons/icons.icomoon.json diff --git a/lostplaces/lostplaces_app/static/icons/information.svg b/django_lostplaces/lostplaces/static/icons/information.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/information.svg rename to django_lostplaces/lostplaces/static/icons/information.svg diff --git a/lostplaces/lostplaces_app/static/icons/location.svg b/django_lostplaces/lostplaces/static/icons/location.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/location.svg rename to django_lostplaces/lostplaces/static/icons/location.svg diff --git a/lostplaces/lostplaces_app/static/icons/message.svg b/django_lostplaces/lostplaces/static/icons/message.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/message.svg rename to django_lostplaces/lostplaces/static/icons/message.svg diff --git a/lostplaces/lostplaces_app/static/icons/plus.svg b/django_lostplaces/lostplaces/static/icons/plus.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/plus.svg rename to django_lostplaces/lostplaces/static/icons/plus.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/facebook.svg b/django_lostplaces/lostplaces/static/icons/social/facebook.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/facebook.svg rename to django_lostplaces/lostplaces/static/icons/social/facebook.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/instagram.svg b/django_lostplaces/lostplaces/static/icons/social/instagram.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/instagram.svg rename to django_lostplaces/lostplaces/static/icons/social/instagram.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/mastodon.svg b/django_lostplaces/lostplaces/static/icons/social/mastodon.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/mastodon.svg rename to django_lostplaces/lostplaces/static/icons/social/mastodon.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/twitter.svg b/django_lostplaces/lostplaces/static/icons/social/twitter.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/twitter.svg rename to django_lostplaces/lostplaces/static/icons/social/twitter.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/vimeo.svg b/django_lostplaces/lostplaces/static/icons/social/vimeo.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/vimeo.svg rename to django_lostplaces/lostplaces/static/icons/social/vimeo.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/vkontakte.svg b/django_lostplaces/lostplaces/static/icons/social/vkontakte.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/vkontakte.svg rename to django_lostplaces/lostplaces/static/icons/social/vkontakte.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/wordpress.svg b/django_lostplaces/lostplaces/static/icons/social/wordpress.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/wordpress.svg rename to django_lostplaces/lostplaces/static/icons/social/wordpress.svg diff --git a/lostplaces/lostplaces_app/static/icons/social/youtube.svg b/django_lostplaces/lostplaces/static/icons/social/youtube.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/social/youtube.svg rename to django_lostplaces/lostplaces/static/icons/social/youtube.svg diff --git a/lostplaces/lostplaces_app/static/icons/success.svg b/django_lostplaces/lostplaces/static/icons/success.svg similarity index 100% rename from lostplaces/lostplaces_app/static/icons/success.svg rename to django_lostplaces/lostplaces/static/icons/success.svg diff --git a/lostplaces/lostplaces_app/static/images/logo.png b/django_lostplaces/lostplaces/static/images/logo.png similarity index 100% rename from lostplaces/lostplaces_app/static/images/logo.png rename to django_lostplaces/lostplaces/static/images/logo.png diff --git a/lostplaces/lostplaces_app/static/logo.png b/django_lostplaces/lostplaces/static/logo.png similarity index 100% rename from lostplaces/lostplaces_app/static/logo.png rename to django_lostplaces/lostplaces/static/logo.png diff --git a/lostplaces/lostplaces_app/static/main.css b/django_lostplaces/lostplaces/static/main.css similarity index 100% rename from lostplaces/lostplaces_app/static/main.css rename to django_lostplaces/lostplaces/static/main.css diff --git a/lostplaces/lostplaces_app/static/maps/ol.css b/django_lostplaces/lostplaces/static/maps/ol.css similarity index 100% rename from lostplaces/lostplaces_app/static/maps/ol.css rename to django_lostplaces/lostplaces/static/maps/ol.css diff --git a/lostplaces/lostplaces_app/static/maps/ol.css.map b/django_lostplaces/lostplaces/static/maps/ol.css.map similarity index 100% rename from lostplaces/lostplaces_app/static/maps/ol.css.map rename to django_lostplaces/lostplaces/static/maps/ol.css.map diff --git a/lostplaces/lostplaces_app/static/maps/ol.js b/django_lostplaces/lostplaces/static/maps/ol.js similarity index 100% rename from lostplaces/lostplaces_app/static/maps/ol.js rename to django_lostplaces/lostplaces/static/maps/ol.js diff --git a/lostplaces/lostplaces_app/static/maps/ol.js.map b/django_lostplaces/lostplaces/static/maps/ol.js.map similarity index 100% rename from lostplaces/lostplaces_app/static/maps/ol.js.map rename to django_lostplaces/lostplaces/static/maps/ol.js.map diff --git a/lostplaces/lostplaces_app/static/maps/source_files_tmp.txt b/django_lostplaces/lostplaces/static/maps/source_files_tmp.txt similarity index 100% rename from lostplaces/lostplaces_app/static/maps/source_files_tmp.txt rename to django_lostplaces/lostplaces/static/maps/source_files_tmp.txt diff --git a/lostplaces/lostplaces_app/static/tagify.min.js b/django_lostplaces/lostplaces/static/tagify.min.js similarity index 100% rename from lostplaces/lostplaces_app/static/tagify.min.js rename to django_lostplaces/lostplaces/static/tagify.min.js diff --git a/lostplaces/lostplaces_app/templates/403.html b/django_lostplaces/lostplaces/templates/403.html similarity index 100% rename from lostplaces/lostplaces_app/templates/403.html rename to django_lostplaces/lostplaces/templates/403.html diff --git a/lostplaces/lostplaces_app/templates/flat/codex.html b/django_lostplaces/lostplaces/templates/flat/codex.html similarity index 100% rename from lostplaces/lostplaces_app/templates/flat/codex.html rename to django_lostplaces/lostplaces/templates/flat/codex.html diff --git a/lostplaces/lostplaces_app/templates/flat/imprint-ger.html b/django_lostplaces/lostplaces/templates/flat/imprint-ger.html similarity index 100% rename from lostplaces/lostplaces_app/templates/flat/imprint-ger.html rename to django_lostplaces/lostplaces/templates/flat/imprint-ger.html diff --git a/lostplaces/lostplaces_app/templates/flat/imprint.html b/django_lostplaces/lostplaces/templates/flat/imprint.html similarity index 100% rename from lostplaces/lostplaces_app/templates/flat/imprint.html rename to django_lostplaces/lostplaces/templates/flat/imprint.html diff --git a/lostplaces/lostplaces_app/templates/flat/privacy-policy-ger.html b/django_lostplaces/lostplaces/templates/flat/privacy-policy-ger.html similarity index 100% rename from lostplaces/lostplaces_app/templates/flat/privacy-policy-ger.html rename to django_lostplaces/lostplaces/templates/flat/privacy-policy-ger.html diff --git a/lostplaces/lostplaces_app/templates/flat/privacy-policy.html b/django_lostplaces/lostplaces/templates/flat/privacy-policy.html similarity index 100% rename from lostplaces/lostplaces_app/templates/flat/privacy-policy.html rename to django_lostplaces/lostplaces/templates/flat/privacy-policy.html diff --git a/lostplaces/lostplaces_app/templates/global.html b/django_lostplaces/lostplaces/templates/global.html similarity index 100% rename from lostplaces/lostplaces_app/templates/global.html rename to django_lostplaces/lostplaces/templates/global.html diff --git a/lostplaces/lostplaces_app/templates/home.html b/django_lostplaces/lostplaces/templates/home.html similarity index 100% rename from lostplaces/lostplaces_app/templates/home.html rename to django_lostplaces/lostplaces/templates/home.html diff --git a/lostplaces/lostplaces_app/templates/home_unauth.html b/django_lostplaces/lostplaces/templates/home_unauth.html similarity index 100% rename from lostplaces/lostplaces_app/templates/home_unauth.html rename to django_lostplaces/lostplaces/templates/home_unauth.html diff --git a/lostplaces/lostplaces_app/templates/partials/form/inputField.html b/django_lostplaces/lostplaces/templates/partials/form/inputField.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/form/inputField.html rename to django_lostplaces/lostplaces/templates/partials/form/inputField.html diff --git a/lostplaces/lostplaces_app/templates/partials/nav/footer.html b/django_lostplaces/lostplaces/templates/partials/nav/footer.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/nav/footer.html rename to django_lostplaces/lostplaces/templates/partials/nav/footer.html diff --git a/lostplaces/lostplaces_app/templates/partials/nav/pagination.html b/django_lostplaces/lostplaces/templates/partials/nav/pagination.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/nav/pagination.html rename to django_lostplaces/lostplaces/templates/partials/nav/pagination.html diff --git a/lostplaces/lostplaces_app/templates/partials/osm_map.html b/django_lostplaces/lostplaces/templates/partials/osm_map.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/osm_map.html rename to django_lostplaces/lostplaces/templates/partials/osm_map.html diff --git a/lostplaces/lostplaces_app/templates/partials/tagging.html b/django_lostplaces/lostplaces/templates/partials/tagging.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/tagging.html rename to django_lostplaces/lostplaces/templates/partials/tagging.html diff --git a/lostplaces/lostplaces_app/templates/partials/welcome.html b/django_lostplaces/lostplaces/templates/partials/welcome.html similarity index 100% rename from lostplaces/lostplaces_app/templates/partials/welcome.html rename to django_lostplaces/lostplaces/templates/partials/welcome.html diff --git a/lostplaces/lostplaces_app/templates/photo_album/photo_album_create.html b/django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html similarity index 100% rename from lostplaces/lostplaces_app/templates/photo_album/photo_album_create.html rename to django_lostplaces/lostplaces/templates/photo_album/photo_album_create.html diff --git a/lostplaces/lostplaces_app/templates/place/place_create.html b/django_lostplaces/lostplaces/templates/place/place_create.html similarity index 100% rename from lostplaces/lostplaces_app/templates/place/place_create.html rename to django_lostplaces/lostplaces/templates/place/place_create.html diff --git a/lostplaces/lostplaces_app/templates/place/place_delete.html b/django_lostplaces/lostplaces/templates/place/place_delete.html similarity index 100% rename from lostplaces/lostplaces_app/templates/place/place_delete.html rename to django_lostplaces/lostplaces/templates/place/place_delete.html diff --git a/lostplaces/lostplaces_app/templates/place/place_detail.html b/django_lostplaces/lostplaces/templates/place/place_detail.html similarity index 100% rename from lostplaces/lostplaces_app/templates/place/place_detail.html rename to django_lostplaces/lostplaces/templates/place/place_detail.html diff --git a/lostplaces/lostplaces_app/templates/place/place_list.html b/django_lostplaces/lostplaces/templates/place/place_list.html similarity index 100% rename from lostplaces/lostplaces_app/templates/place/place_list.html rename to django_lostplaces/lostplaces/templates/place/place_list.html diff --git a/lostplaces/lostplaces_app/templates/place/place_update.html b/django_lostplaces/lostplaces/templates/place/place_update.html similarity index 100% rename from lostplaces/lostplaces_app/templates/place/place_update.html rename to django_lostplaces/lostplaces/templates/place/place_update.html diff --git a/lostplaces/lostplaces_app/templates/registration/login.html b/django_lostplaces/lostplaces/templates/registration/login.html similarity index 100% rename from lostplaces/lostplaces_app/templates/registration/login.html rename to django_lostplaces/lostplaces/templates/registration/login.html diff --git a/lostplaces/lostplaces_app/templates/signup.html b/django_lostplaces/lostplaces/templates/signup.html similarity index 100% rename from lostplaces/lostplaces_app/templates/signup.html rename to django_lostplaces/lostplaces/templates/signup.html diff --git a/lostplaces/lostplaces_app/templates/svg_icon/icon.html b/django_lostplaces/lostplaces/templates/svg_icon/icon.html similarity index 100% rename from lostplaces/lostplaces_app/templates/svg_icon/icon.html rename to django_lostplaces/lostplaces/templates/svg_icon/icon.html diff --git a/lostplaces/lostplaces_app/templatetags/__init__.py b/django_lostplaces/lostplaces/templatetags/__init__.py similarity index 100% rename from lostplaces/lostplaces_app/templatetags/__init__.py rename to django_lostplaces/lostplaces/templatetags/__init__.py diff --git a/lostplaces/lostplaces_app/templatetags/lostplaces.py b/django_lostplaces/lostplaces/templatetags/lostplaces.py similarity index 100% rename from lostplaces/lostplaces_app/templatetags/lostplaces.py rename to django_lostplaces/lostplaces/templatetags/lostplaces.py diff --git a/lostplaces/lostplaces_app/templatetags/svg_icon.py b/django_lostplaces/lostplaces/templatetags/svg_icon.py similarity index 88% rename from lostplaces/lostplaces_app/templatetags/svg_icon.py rename to django_lostplaces/lostplaces/templatetags/svg_icon.py index beb0038..9854d9c 100644 --- a/lostplaces/lostplaces_app/templatetags/svg_icon.py +++ b/django_lostplaces/lostplaces/templatetags/svg_icon.py @@ -6,7 +6,7 @@ from django.conf import settings from django.template import Library, TemplateSyntaxError #icons_json_path = getattr(settings, 'SVG_ICONS_SOURCE_FILE') -icons_json_path = os.path.join(settings.BASE_DIR, 'lostplaces_app', 'static', 'icons', 'icons.icomoon.json') +icons_json_path = os.path.join(settings.BASE_DIR, 'lostplaces', 'static', 'icons', 'icons.icomoon.json') icons_json = json.load(open(icons_json_path)) register = Library() diff --git a/lostplaces/lostplaces_app/tests/__init__.py b/django_lostplaces/lostplaces/tests/__init__.py similarity index 100% rename from lostplaces/lostplaces_app/tests/__init__.py rename to django_lostplaces/lostplaces/tests/__init__.py diff --git a/lostplaces/lostplaces_app/tests/models/__init__.py b/django_lostplaces/lostplaces/tests/models/__init__.py similarity index 100% rename from lostplaces/lostplaces_app/tests/models/__init__.py rename to django_lostplaces/lostplaces/tests/models/__init__.py diff --git a/lostplaces/lostplaces_app/tests/models/im_a_image.jpeg b/django_lostplaces/lostplaces/tests/models/im_a_image.jpeg similarity index 100% rename from lostplaces/lostplaces_app/tests/models/im_a_image.jpeg rename to django_lostplaces/lostplaces/tests/models/im_a_image.jpeg diff --git a/lostplaces/lostplaces_app/tests/models/test_abstract_models.py b/django_lostplaces/lostplaces/tests/models/test_abstract_models.py similarity index 96% rename from lostplaces/lostplaces_app/tests/models/test_abstract_models.py rename to django_lostplaces/lostplaces/tests/models/test_abstract_models.py index 5f898ad..b33fe84 100644 --- a/lostplaces/lostplaces_app/tests/models/test_abstract_models.py +++ b/django_lostplaces/lostplaces/tests/models/test_abstract_models.py @@ -4,12 +4,12 @@ from django.test import TestCase from django.db import models from django.contrib.auth.models import User -from lostplaces_app.models import ( +from lostplaces.models import ( Taggable, Mapable, Submittable ) -from lostplaces_app.tests.models import ModelTestCase +from lostplaces.tests.models import ModelTestCase from taggit.managers import TaggableManager diff --git a/lostplaces/lostplaces_app/tests/models/test_explorer_model.py b/django_lostplaces/lostplaces/tests/models/test_explorer_model.py similarity index 97% rename from lostplaces/lostplaces_app/tests/models/test_explorer_model.py rename to django_lostplaces/lostplaces/tests/models/test_explorer_model.py index 489529f..14cf38c 100644 --- a/lostplaces/lostplaces_app/tests/models/test_explorer_model.py +++ b/django_lostplaces/lostplaces/tests/models/test_explorer_model.py @@ -2,7 +2,7 @@ from django.test import TestCase from django.db import models from django.contrib.auth.models import User -from lostplaces_app.models import Explorer +from lostplaces.models import Explorer class ExplorerTestCase(TestCase): diff --git a/lostplaces/lostplaces_app/tests/models/test_place_image_model.py b/django_lostplaces/lostplaces/tests/models/test_place_image_model.py similarity index 96% rename from lostplaces/lostplaces_app/tests/models/test_place_image_model.py rename to django_lostplaces/lostplaces/tests/models/test_place_image_model.py index 1ff5305..d351b66 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_image_model.py +++ b/django_lostplaces/lostplaces/tests/models/test_place_image_model.py @@ -9,8 +9,8 @@ from django.core.files import File from django.conf import settings from django.contrib.auth.models import User -from lostplaces_app.models import PlaceImage, Place -from lostplaces_app.tests.models import ModelTestCase +from lostplaces.models import PlaceImage, Place +from lostplaces.tests.models import ModelTestCase from easy_thumbnails.fields import ThumbnailerImageField diff --git a/lostplaces/lostplaces_app/tests/models/test_place_model.py b/django_lostplaces/lostplaces/tests/models/test_place_model.py similarity index 97% rename from lostplaces/lostplaces_app/tests/models/test_place_model.py rename to django_lostplaces/lostplaces/tests/models/test_place_model.py index 7fc5f32..04d9647 100644 --- a/lostplaces/lostplaces_app/tests/models/test_place_model.py +++ b/django_lostplaces/lostplaces/tests/models/test_place_model.py @@ -5,8 +5,8 @@ from django.db import models from django.contrib.auth.models import User -from lostplaces_app.models import Place -from lostplaces_app.tests.models import ModelTestCase +from lostplaces.models import Place +from lostplaces.tests.models import ModelTestCase class PlaceTestCase(ModelTestCase): model = Place diff --git a/lostplaces/lostplaces_app/tests/models/test_voucher_model.py b/django_lostplaces/lostplaces/tests/models/test_voucher_model.py similarity index 93% rename from lostplaces/lostplaces_app/tests/models/test_voucher_model.py rename to django_lostplaces/lostplaces/tests/models/test_voucher_model.py index 7b86f48..06964d8 100644 --- a/lostplaces/lostplaces_app/tests/models/test_voucher_model.py +++ b/django_lostplaces/lostplaces/tests/models/test_voucher_model.py @@ -4,8 +4,8 @@ from django.test import TestCase from django.db import models from django.utils import timezone -from lostplaces_app.models import Voucher -from lostplaces_app.tests.models import ModelTestCase +from lostplaces.models import Voucher +from lostplaces.tests.models import ModelTestCase class VoucheTestCase(ModelTestCase): diff --git a/lostplaces/lostplaces_app/tests/views/__init__.py b/django_lostplaces/lostplaces/tests/views/__init__.py similarity index 99% rename from lostplaces/lostplaces_app/tests/views/__init__.py rename to django_lostplaces/lostplaces/tests/views/__init__.py index faceaa7..77a876f 100644 --- a/lostplaces/lostplaces_app/tests/views/__init__.py +++ b/django_lostplaces/lostplaces/tests/views/__init__.py @@ -1,6 +1,6 @@ from django.test import TestCase -from lostplaces_app.models import Taggable, Mapable +from lostplaces.models import Taggable, Mapable from taggit.models import Tag diff --git a/lostplaces/lostplaces_app/tests/views/test_base_views.py b/django_lostplaces/lostplaces/tests/views/test_base_views.py similarity index 92% rename from lostplaces/lostplaces_app/tests/views/test_base_views.py rename to django_lostplaces/lostplaces/tests/views/test_base_views.py index 44fbd8d..94d4ce6 100644 --- a/lostplaces/lostplaces_app/tests/views/test_base_views.py +++ b/django_lostplaces/lostplaces/tests/views/test_base_views.py @@ -5,9 +5,9 @@ from django.urls import reverse_lazy from django.contrib.auth.models import User, AnonymousUser from django.contrib.messages.storage.fallback import FallbackStorage -from lostplaces_app.models import Place -from lostplaces_app.views import IsAuthenticatedMixin -from lostplaces_app.tests.views import ViewTestCase +from lostplaces.models import Place +from lostplaces.views import IsAuthenticatedMixin +from lostplaces.tests.views import ViewTestCase class TestIsAuthenticated(ViewTestCase): view = IsAuthenticatedMixin diff --git a/lostplaces/lostplaces_app/tests/views/test_place_views.py b/django_lostplaces/lostplaces/tests/views/test_place_views.py similarity index 95% rename from lostplaces/lostplaces_app/tests/views/test_place_views.py rename to django_lostplaces/lostplaces/tests/views/test_place_views.py index 6913399..807d030 100644 --- a/lostplaces/lostplaces_app/tests/views/test_place_views.py +++ b/django_lostplaces/lostplaces/tests/views/test_place_views.py @@ -4,14 +4,14 @@ from django.test import TestCase, Client from django.urls import reverse from django.contrib.auth.models import User -from lostplaces_app.models import Place -from lostplaces_app.views import ( +from lostplaces.models import Place +from lostplaces.views import ( PlaceCreateView, PlaceListView, PlaceDetailView ) -from lostplaces_app.forms import PlaceImageCreateForm, PlaceForm -from lostplaces_app.tests.views import ( +from lostplaces.forms import PlaceImageCreateForm, PlaceForm +from lostplaces.tests.views import ( ViewTestCase, TaggableViewTestCaseMixin, MapableViewTestCaseMixin diff --git a/lostplaces/lostplaces_app/urls.py b/django_lostplaces/lostplaces/urls.py similarity index 97% rename from lostplaces/lostplaces_app/urls.py rename to django_lostplaces/lostplaces/urls.py index 8d88f6d..3a9cd63 100644 --- a/lostplaces/lostplaces_app/urls.py +++ b/django_lostplaces/lostplaces/urls.py @@ -1,5 +1,5 @@ from django.urls import path -from lostplaces_app.views import ( +from lostplaces.views import ( HomeView, PlaceDetailView, PlaceListView, diff --git a/django_lostplaces/lostplaces/views/__init__.py b/django_lostplaces/lostplaces/views/__init__.py new file mode 100644 index 0000000..cdb2352 --- /dev/null +++ b/django_lostplaces/lostplaces/views/__init__.py @@ -0,0 +1,3 @@ +from lostplaces.views.base_views import * +from lostplaces.views.views import * +from lostplaces.views.place_views import * \ No newline at end of file diff --git a/lostplaces/lostplaces_app/views/base_views.py b/django_lostplaces/lostplaces/views/base_views.py similarity index 98% rename from lostplaces/lostplaces_app/views/base_views.py rename to django_lostplaces/lostplaces/views/base_views.py index da2c8bf..7ee23b5 100644 --- a/lostplaces/lostplaces_app/views/base_views.py +++ b/django_lostplaces/lostplaces/views/base_views.py @@ -9,7 +9,7 @@ from django.contrib.messages.views import SuccessMessageMixin from django.shortcuts import redirect from django.urls import reverse_lazy -from lostplaces_app.models import Place +from lostplaces.models import Place class IsAuthenticatedMixin(LoginRequiredMixin, View): ''' diff --git a/lostplaces/lostplaces_app/views/place_views.py b/django_lostplaces/lostplaces/views/place_views.py similarity index 94% rename from lostplaces/lostplaces_app/views/place_views.py rename to django_lostplaces/lostplaces/views/place_views.py index a4124e6..9ff709a 100644 --- a/lostplaces/lostplaces_app/views/place_views.py +++ b/django_lostplaces/lostplaces/views/place_views.py @@ -9,9 +9,9 @@ from django.contrib.messages.views import SuccessMessageMixin from django.shortcuts import render, redirect from django.urls import reverse_lazy -from lostplaces_app.models import Place, PlaceImage -from lostplaces_app.views import IsAuthenticatedMixin, IsPlaceSubmitterMixin -from lostplaces_app.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm +from lostplaces.models import Place, PlaceImage +from lostplaces.views import IsAuthenticatedMixin, IsPlaceSubmitterMixin +from lostplaces.forms import PlaceForm, PlaceImageCreateForm, TagSubmitForm from taggit.models import Tag diff --git a/lostplaces/lostplaces_app/views/views.py b/django_lostplaces/lostplaces/views/views.py similarity index 91% rename from lostplaces/lostplaces_app/views/views.py rename to django_lostplaces/lostplaces/views/views.py index 28b4985..407cc8b 100644 --- a/lostplaces/lostplaces_app/views/views.py +++ b/django_lostplaces/lostplaces/views/views.py @@ -7,11 +7,11 @@ from django.urls import reverse_lazy from django.shortcuts import render, redirect, get_object_or_404 from django.http import HttpResponseForbidden -from lostplaces_app.forms import ExplorerCreationForm, TagSubmitForm -from lostplaces_app.models import Place, PhotoAlbum -from lostplaces_app.views.base_views import IsAuthenticatedMixin +from lostplaces.forms import ExplorerCreationForm, TagSubmitForm +from lostplaces.models import Place, PhotoAlbum +from lostplaces.views.base_views import IsAuthenticatedMixin -from lostplaces_app.views.base_views import ( +from lostplaces.views.base_views import ( PlaceAssetCreateView, PlaceAssetDeleteView, ) diff --git a/lostplaces/manage.py b/django_lostplaces/manage.py similarity index 87% rename from lostplaces/manage.py rename to django_lostplaces/manage.py index cd4ee9b..5e5661e 100755 --- a/lostplaces/manage.py +++ b/django_lostplaces/manage.py @@ -7,7 +7,7 @@ import os import sys def main(): - os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'lostplaces.settings') + os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'django_lostplaces.settings') try: from django.core.management import execute_from_command_line except ImportError as exc: diff --git a/lostplaces/lostplaces_app/views/__init__.py b/lostplaces/lostplaces_app/views/__init__.py deleted file mode 100644 index 72591e2..0000000 --- a/lostplaces/lostplaces_app/views/__init__.py +++ /dev/null @@ -1,3 +0,0 @@ -from lostplaces_app.views.base_views import * -from lostplaces_app.views.views import * -from lostplaces_app.views.place_views import * \ No newline at end of file