generated from 2martens/django-template
Renamed further remnants of app to food_planner
This commit is contained in:
parent
67777e8b6a
commit
37b88f321e
|
@ -3,7 +3,7 @@ from django.urls import path
|
||||||
|
|
||||||
from . import views
|
from . import views
|
||||||
|
|
||||||
app_name = 'app'
|
app_name = 'food_planner'
|
||||||
urlpatterns = [
|
urlpatterns = [
|
||||||
path('', views.index, name='index'),
|
path('', views.index, name='index'),
|
||||||
path('legal-notice/', views.legal, name='legal'),
|
path('legal-notice/', views.legal, name='legal'),
|
||||||
|
|
|
@ -31,7 +31,7 @@ def index(request) -> HttpResponse:
|
||||||
@transaction.atomic
|
@transaction.atomic
|
||||||
def register(request) -> HttpResponse:
|
def register(request) -> HttpResponse:
|
||||||
if request.user.is_authenticated:
|
if request.user.is_authenticated:
|
||||||
return redirect('app:index')
|
return redirect('food_planner:index')
|
||||||
|
|
||||||
user_form = UserCreationForm(data=request.POST or None)
|
user_form = UserCreationForm(data=request.POST or None)
|
||||||
profile_form = ProfileForm(data=request.POST or None, files=request.FILES or None)
|
profile_form = ProfileForm(data=request.POST or None, files=request.FILES or None)
|
||||||
|
|
|
@ -109,10 +109,10 @@ AUTH_PASSWORD_VALIDATORS = [
|
||||||
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
|
||||||
},
|
},
|
||||||
]
|
]
|
||||||
AUTH_PROFILE_MODULE = 'app.Profile'
|
AUTH_PROFILE_MODULE = 'food_planner.Profile'
|
||||||
|
|
||||||
LOGIN_REDIRECT_URL = 'app:index'
|
LOGIN_REDIRECT_URL = 'food_planner:index'
|
||||||
LOGOUT_REDIRECT_URL = 'app:index'
|
LOGOUT_REDIRECT_URL = 'food_planner:index'
|
||||||
LOGIN_URL = 'login'
|
LOGIN_URL = 'login'
|
||||||
|
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue