diff --git a/accounts/apps.py b/accounts/apps.py new file mode 100644 index 0000000..c0bd956 --- /dev/null +++ b/accounts/apps.py @@ -0,0 +1,5 @@ +from django.apps import AppConfig + + +class Accounts(AppConfig): + name = 'accounts' diff --git a/signup/forms.py b/accounts/forms.py similarity index 100% rename from signup/forms.py rename to accounts/forms.py diff --git a/signup/settings.py b/accounts/settings.py similarity index 64% rename from signup/settings.py rename to accounts/settings.py index 91a0e2c..16e4aa7 100644 --- a/signup/settings.py +++ b/accounts/settings.py @@ -2,7 +2,7 @@ import os BASE_DIR = os.path.dirname(os.path.dirname(os.path.abspath(__file__))) TEMPLATES = [ { - 'DIRS': [os.path.join(BASE_DIR, 'photo21/signup/templates')], + 'DIRS': [os.path.join(BASE_DIR, 'photo21/accounts/templates')], 'APP_DIRS': True, }, -] \ No newline at end of file +] diff --git a/signup/templates/signup.html b/accounts/templates/signup.html similarity index 100% rename from signup/templates/signup.html rename to accounts/templates/signup.html diff --git a/signup/urls.py b/accounts/urls.py similarity index 65% rename from signup/urls.py rename to accounts/urls.py index 36b8346..982cdca 100644 --- a/signup/urls.py +++ b/accounts/urls.py @@ -2,5 +2,5 @@ from django.urls import path from .views import signup urlpatterns = [ - path('', signup, name='signup'), + path('', signup, name='accounts'), ] diff --git a/signup/views.py b/accounts/views.py similarity index 100% rename from signup/views.py rename to accounts/views.py diff --git a/photo21/middleware.py b/photo21/middleware.py index 230e373..88ad41c 100644 --- a/photo21/middleware.py +++ b/photo21/middleware.py @@ -1,5 +1,6 @@ from django.http import HttpResponseRedirect from django.conf import settings + import ipaddress import re diff --git a/photo21/settings.py b/photo21/settings.py index 98510c0..bda42a0 100644 --- a/photo21/settings.py +++ b/photo21/settings.py @@ -43,7 +43,7 @@ INSTALLED_APPS = [ 'django.contrib.staticfiles', 'photologue_custom', 'photologue', - 'signup', + 'accounts', 'sortedm2m', 'taggit', ] diff --git a/photo21/urls.py b/photo21/urls.py index efae970..3b4a601 100644 --- a/photo21/urls.py +++ b/photo21/urls.py @@ -17,7 +17,6 @@ from django.contrib import admin from django.urls import include, path from django.conf import settings from django.conf.urls.static import static -from django.contrib.auth.decorators import login_required from .views import IndexView @@ -30,7 +29,7 @@ urlpatterns = [ path('i18n/', include('django.conf.urls.i18n')), path('admin/', admin.site.urls), path('admin/doc/', include('django.contrib.admindocs.urls')), - path('accounts/signup/', include('signup.urls')) + path('accounts/registration/', include('accounts.urls')) ] if settings.DEBUG: diff --git a/signup/apps.py b/signup/apps.py deleted file mode 100644 index 806582a..0000000 --- a/signup/apps.py +++ /dev/null @@ -1,4 +0,0 @@ -from django.apps import AppConfig - -class Signup(AppConfig): - name = 'signup' \ No newline at end of file diff --git a/tox.ini b/tox.ini index 30d8c12..03d6b2a 100644 --- a/tox.ini +++ b/tox.ini @@ -18,7 +18,7 @@ deps = -r{toxinidir}/requirements.txt coverage commands = - coverage run --omit='photo21/wsgi.py' --source=photo21,photologue_custom ./manage.py test + coverage run --omit='photo21/wsgi.py' --source=photo21,photologue_custom,accounts ./manage.py test coverage report -m [testenv:linters] @@ -32,7 +32,7 @@ deps = pep8-naming pyflakes commands = - flake8 photo21 photologue_custom + flake8 photo21 photologue_custom accounts [flake8] ignore = W503, I100, I101