from django.conf.urls import patterns, url from django.views.generic import TemplateView from account.views import SignupView, LoginView, LogoutView, DeleteView from account.views import ConfirmEmailView from account.views import ChangePasswordView, PasswordResetView, \ PasswordResetTokenView from account.views import SettingsView urlpatterns = patterns( "", url(r"^signup/$", SignupView.as_view(), name="account_signup"), url(r"^login/$", LoginView.as_view(), name="account_login"), url(r"^logout/$", LogoutView.as_view(), name="account_logout"), url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"), url(r"^password/$", ChangePasswordView.as_view(), name="account_password"), url(r"^password/reset/$", PasswordResetView.as_view(), name="account_password_reset"), url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", PasswordResetTokenView.as_view(), name="account_password_reset_token"), url(r"^settings/$", SettingsView.as_view(), name="account_settings"), url(r"^delete/$", DeleteView.as_view(), name="account_delete"), ) handler403 = TemplateView.as_view(template_name="403.html") handler404 = TemplateView.as_view(template_name="404.html") handler500 = TemplateView.as_view(template_name="500.html")
from account.views import (SignupView, LoginView, LogoutView, DeleteView, ConfirmEmailView, ChangePasswordView, PasswordResetView, PasswordResetTokenView, SettingsView) urlpatterns += i18n_patterns( "", url(_(r"^signup/$"), SignupView.as_view(), name="account_signup"), # original is: url(_(r"^login/$"), but we prefer: url(_(ur'^signin/$'), never_cache(LoginView.as_view()), name="signin"), # original is: url(_(r"^logout/$"), but we prefer: url(_(ur'^signout/$'), never_cache(LogoutView.as_view()), name="signout"), url(_(r"^confirm_email/(?P<key>\w+)/$"), ConfirmEmailView.as_view(), name="account_confirm_email"), url(_(r"^password/$"), ChangePasswordView.as_view(), name="account_password"), url(_(r"^password/reset/$"), PasswordResetView.as_view(), name="account_password_reset"), url(_(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$"), PasswordResetTokenView.as_view(), name="account_password_reset_token"), url(_(r"^settings/$"), SettingsView.as_view(), name="account_settings"), url(_(r"^delete/$"), DeleteView.as_view(), name="account_delete"), ) # As an alternative, we could have used one indirection level,
from __future__ import unicode_literals from django.conf.urls import patterns, url from account.views import SignupView, LoginView, LogoutView, DeleteView from account.views import ConfirmEmailView from account.views import ChangePasswordView, PasswordResetView, PasswordResetTokenView from account.views import SettingsView urlpatterns = patterns("", url(r"^signup/$", SignupView.as_view(), name="account_signup"), url(r"^login/$", LoginView.as_view(), name="account_login"), url(r"^logout/$", LogoutView.as_view(), name="account_logout"), url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"), url(r"^password/$", ChangePasswordView.as_view(), name="account_password"), url(r"^password/reset/$", PasswordResetView.as_view(), name="account_password_reset"), url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", PasswordResetTokenView.as_view(), name="account_password_reset_token"), url(r"^settings/$", SettingsView.as_view(), name="account_settings"), url(r"^delete/$", DeleteView.as_view(), name="account_delete"), )
from django.conf.urls.static import static from django.contrib import admin from django.views.generic import TemplateView from LMS import views urlpatterns = [ url(r"^$", TemplateView.as_view(template_name="homepage.html"), name="home"), url(r"^admin/", include([ url(r'^misc/', admin.site.urls), url(r'^', include('LMS_Admin.urls')), ])), url(r"^stu/", include("LMS_Student.urls")), url(r"^lec/", include("LMS_Teacher.urls")), url(r"^account/", include([ url(r"^signup/$", SignupView.as_view(), name="account_signup"), url(r"^login/$", views.LoginView.as_view(), name="account_login"), url(r"^logout/$", LogoutView.as_view(), name="account_logout"), url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"), url(r"^password/$", ChangePasswordView.as_view(), name="account_password"), url(r"^password/reset/$", PasswordResetView.as_view(), name="account_password_reset"), url(r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$", PasswordResetTokenView.as_view(), name="account_password_reset_token"), url(r"^settings/$", SettingsView.as_view(), name="account_settings"), url(r"^delete/$", DeleteView.as_view(), name="account_delete"), ])), ] urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)