Browse Source

Renamed further remnants of app to food_planner

master
Jim Martens 2 years ago
parent
commit
37b88f321e
  1. 2
      food_planner/urls.py
  2. 2
      food_planner/views.py
  3. 6
      project/settings.py

2
food_planner/urls.py

@ -3,7 +3,7 @@ from django.urls import path
from . import views
app_name = 'app'
app_name = 'food_planner'
urlpatterns = [
path('', views.index, name='index'),
path('legal-notice/', views.legal, name='legal'),

2
food_planner/views.py

@ -31,7 +31,7 @@ def index(request) -> HttpResponse:
@transaction.atomic
def register(request) -> HttpResponse:
if request.user.is_authenticated:
return redirect('app:index')
return redirect('food_planner:index')
user_form = UserCreationForm(data=request.POST or None)
profile_form = ProfileForm(data=request.POST or None, files=request.FILES or None)

6
project/settings.py

@ -109,10 +109,10 @@ AUTH_PASSWORD_VALIDATORS = [
'NAME': 'django.contrib.auth.password_validation.NumericPasswordValidator',
},
]
AUTH_PROFILE_MODULE = 'app.Profile'
AUTH_PROFILE_MODULE = 'food_planner.Profile'
LOGIN_REDIRECT_URL = 'app:index'
LOGOUT_REDIRECT_URL = 'app:index'
LOGIN_REDIRECT_URL = 'food_planner:index'
LOGOUT_REDIRECT_URL = 'food_planner:index'
LOGIN_URL = 'login'

Loading…
Cancel
Save