Create new app for homepage
This commit is contained in:
@@ -3,9 +3,14 @@ from . import views
|
||||
from django.contrib.auth.views import LogoutView
|
||||
from django.contrib.auth.views import LoginView
|
||||
|
||||
app_name = 'accounts' # Namensraum zum verhindern von Konflikten zwischen Apps
|
||||
#
|
||||
# Wichtig: Damit Links funktionieren müssen diese so eingebunden werden: {% url 'accounts:login' %} statt {% url 'login' %}
|
||||
#
|
||||
|
||||
urlpatterns = [
|
||||
path('', views.home, name='home'),
|
||||
path('logout/', LogoutView.as_view(next_page='login'), name='logout'),
|
||||
path('login/', LoginView.as_view(template_name='accounts/login.html', next_page='home'), name='login'),
|
||||
path('logout/', LogoutView.as_view(next_page='accounts:login'), name='logout'),
|
||||
path('login/', LoginView.as_view(template_name='accounts/login.html', next_page='accounts:home'), name='login'),
|
||||
path('register/', views.register, name='register'),
|
||||
]
|
||||
Reference in New Issue
Block a user