urls.py 1.07 KB
Newer Older
Hubert Denkmair's avatar
Hubert Denkmair committed
1
2
3
4
5
6
from django.contrib import admin
from django.urls import path
from django.contrib.auth import views as auth_views
from django.views.generic import TemplateView
from django.views.generic.base import RedirectView
from core import views as core_views
7
from highscore import views as highscore_views
Hubert Denkmair's avatar
Hubert Denkmair committed
8
9
10
11
12
13
14

urlpatterns = [
    path('', TemplateView.as_view(template_name='index.html'), name='home'),
    path('admin/', admin.site.urls),
    path('signup/', core_views.signup, name='signup'),
    path('login/', auth_views.login, {'template_name': 'login.html'}, name='login'),
    path('logout/', auth_views.logout, {'next_page': 'login'}, name='logout'),
Hubert Denkmair's avatar
Hubert Denkmair committed
15
    path('watch/', TemplateView.as_view(template_name='watch/watch.html'), name='watch'),
Hubert Denkmair's avatar
Hubert Denkmair committed
16
    path('accounts/profile/', RedirectView.as_view(url='/', permanent=False)),
Hubert Denkmair's avatar
Hubert Denkmair committed
17
18
19
    path('snake/', core_views.snake_list, name='snake'),
    path('snake/create', core_views.snake_create, name='snake_create'),
    path('snake/<int:snake_id>', core_views.snake_edit, name='snake_edit'),
20
    path('highscore/', highscore_views.table, name='highscore_table')
Hubert Denkmair's avatar
Hubert Denkmair committed
21
]