16 lines
685 B
Python
16 lines
685 B
Python
from django.urls import path # type: ignore
|
|
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='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'),
|
|
] |