# Use this file to import all other url from game_website import settings urlpatterns = patterns( # Examples: # url(r'^blog/', include('blog.urls')), '', url(r'^$', Home.as_view(), name='home'), url(r'^games/', include('core.urls.games', namespace="games")), url(r'^register/$', register, name='register'), url(r'^profile/', include('core.urls.profile', namespace='profile')), # Group urls url(r'^user/groups/$', UserGroupsView.as_view(), name='user-groups'), url(r'^groups/$', GroupsView.as_view(), name='groups'), url(r'^groups/(?P<pk>\d+)/$', GroupDetailView.as_view(), name='groups-detail'), url(r'^groups/(?P<pk>\d+)/join/$', GroupJoinView.as_view(), name='groups-join'), url(r'^groups/(?P<pk>\d+)/leave/$', GroupLeaveView.as_view(), name='groups-leave'), url(r'^invite/(?P<pk>\d+)/$', GroupInvitationView.as_view(), name='invite'), url(r'^groups/new/$', GroupCreateView.as_view(), name='groups-new'), # Login urls url(r'^login/$', 'django.contrib.auth.views.login', name='login'), url(r'^logout/$', 'django.contrib.auth.views.logout', {'next_page': 'core:home'}, name='logout'), url(r'^select2/', include('django_select2.urls')), ) + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) + \ static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # Used to serve static media in a dev environment. Should be disabled in production
from core.views import ContactUsView, ExportStudentsView,\ GroupCreateView, GroupUpdateView, GroupsView,\ IndexView, RegistrationView, StudentCreateView,\ StudentUpdateView, StudentsView, TeacherCreateView,\ TeacherUpdateView, TeachersView from django.urls import path urlpatterns = [ path('', IndexView.as_view(), name='home'), path('groups/', GroupsView.as_view(), name='groups'), path('group/create', GroupCreateView.as_view(), name='group_create'), path('group/update/<int:group_id>/', GroupUpdateView.as_view(), name='group_update'), path('teachers/', TeachersView.as_view(), name='teachers'), path('teachers/create', TeacherCreateView.as_view(), name='teachers_create'), path('teacher/update/<int:teacher_id>/', TeacherUpdateView.as_view(), name='teacher_update'), path('students/', StudentsView.as_view(), name='students'), path('student/create/', StudentCreateView.as_view(), name='student_create'), path('student/update/<int:student_id>/', StudentUpdateView.as_view(), name='student_update'), path('contact_us/', ContactUsView.as_view(), name='contact_us'), path('registration/', RegistrationView.as_view(), name='registration'), path('export/students',
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/3.1/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: path('', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: path('', Home.as_view(), name='home') Including another URLconf 1. Import the include() function: from django.urls import include, path 2. Add a URL to urlpatterns: path('blog/', include('blog.urls')) """ from core.views import GroupCreateView,\ GroupsView, IndexView, StudentCreateView, TeachersView import debug_toolbar from django.contrib import admin from django.urls import include, path urlpatterns = [ path('admin/', admin.site.urls), path('', IndexView.as_view()), path('__debug__/', include(debug_toolbar.urls)), path('teachers/', TeachersView.as_view()), path('groups/', GroupsView.as_view()), path('create_student/', StudentCreateView.as_view()), path('create_group/', GroupCreateView.as_view()), ]