name='info'), url(r'contact/', TemplateView.as_view(template_name='contact.html'), name='contact'), url(r'conduct/', TemplateView.as_view(template_name='coc.html'), name='conduct'), url(r'sponsors/', TemplateView.as_view(template_name='sponsors.html'), name='call-for-sponsors'), url(r'speakers/', TemplateView.as_view(template_name='speakers.html'), name='call-for-speakers'), url( r'^login/$', LoginView.as_view(), name='account_login', ), url( r'^logout/$', LogoutView.as_view(), name='account_logout', ), url(r'privacy-policy/$', TemplateView.as_view(template_name='legal/privacy_policy.html'), name='privacy-policy'), url(r'general-terms-and-conditions/$', TemplateView.as_view( template_name='legal/general_terms_and_conditions.html'), name='general-terms'), url(r'^profile/', include('profiles.urls', namespace='profiles')),
TemplateView.as_view(template_name="pages/roadmap.html"), name="roadmap", ), path( "sitemap.xml", sitemap, {"sitemaps": sitemaps}, name="django.contrib.sitemaps.views.sitemap", ), # Django Admin, use {% url 'admin:index' %} path(settings.ADMIN_URL, admin.site.urls), # User management path("users/", include("donate_anything.users.urls", namespace="users")), path( "accounts/login/", LoginView.as_view(form_class=AxesLoginForm), name="account_login", ), path("accounts/", include("allauth.urls"), name="allauth"), # Custom urls includes go here path("item/", include("donate_anything.item.urls", namespace="item")), path("organization/", include("donate_anything.charity.urls", namespace="charity")), path("forum/", include("donate_anything.forum.urls", namespace="forum")), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ path(
path("o/", include("oauth2_provider.urls", namespace="oauth2_provider")), path("profile/", include("allauth.urls")), path("profile/", include("allauth_2fa.urls")), path("profile/", include("profiles.urls", namespace="profiles")), path("tickets/", include("tickets.urls", namespace="tickets")), path("shop/", include("shop.urls", namespace="shop")), path("news/", include("news.urls", namespace="news")), path( "contact/", ContactView.as_view(), name="contact", ), path("conduct/", TemplateView.as_view(template_name="coc.html"), name="conduct"), path("login/", LoginView.as_view(), name="account_login"), path("logout/", LogoutView.as_view(), name="account_logout"), path( "privacy-policy/", TemplateView.as_view(template_name="legal/privacy_policy.html"), name="privacy-policy", ), path( "general-terms-and-conditions/", TemplateView.as_view( template_name="legal/general_terms_and_conditions.html"), name="general-terms", ), path("admin/", admin.site.urls), path("camps/", CampListView.as_view(), name="camp_list"), path("token/", include("tokens.urls", namespace="tokens")),
from django.urls import path, include from . import views as auction_views from allauth.account.views import LoginView, LogoutView, PasswordResetView urlpatterns = [ path('', auction_views.home, name='index'), path('register/', auction_views.register, name='register'), path('login/', LoginView.as_view(template_name='auction/login.html'), name='login'), path('logout/', LogoutView.as_view(template_name='auction/logout.html'), name='logout'), path( 'password_reset/', PasswordResetView.as_view(template_name='auction/password_reset.html'), name='reset_password'), path('team/<str:pk>/', auction_views.TeamDetailView.as_view(), name='team-detail'), path('team/<str:pk>/edit', auction_views.updateTeamView.as_view(), name='team-edit'), # path('team/list', # auction_views.TeamLineUpListView.as_view(), name='lineup'), path('auctions/list', auction_views.AuctionListView.as_view(), name='auction-list'), path('auctions/new', auction_views.AuctionCreateView.as_view(), name='auction-new'),
MarketDetailView.as_view(), name='market-detail'), path('api/target-list', TargetListAPI.as_view(), name='target-list-api'), path('api/signal-create/', SignalCreateAPI.as_view(), name='signal-create-api'), path('api/signal-update/<int:pk>/', SignalUpdateAPI.as_view(), name='signal-update-api'), path('api/condition-create/', ConditionCreateAPI.as_view(), name='condition-create-api'), path('api/coin-detail/<slug:slug>/', CoinDetailAPI.as_view(), name='coin-detial-api'), path('login/', LoginView.as_view(), name='account_login'), path('logout/', LogoutView.as_view(), name='account_logout'), path('signup/', SignupView.as_view(), name='account_signup'), path('reset-password/', PasswordResetView.as_view(), name='account_reset_password'), path('confirm-email/(?P<key>[-:\w]+)/', confirm_email, name='account_confirm_email'), # password reset path('password/reset/', password_reset, name='account_reset_password'), path('password/reset/done/', password_reset_done, name='account_reset_password_done'), path('password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/',
"""maoaberta URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.8/topics/http/urls/ Examples: Function views 1. Add an import: from my_app import views 2. Add a URL to urlpatterns: url(r'^$', views.home, name='home') Class-based views 1. Add an import: from other_app.views import Home 2. Add a URL to urlpatterns: url(r'^$', Home.as_view(), name='home') Including another URLconf 1. Add an import: from blog import urls as blog_urls 2. Add a URL to urlpatterns: url(r'^blog/', include(blog_urls)) """ from django.conf.urls import include, url from django.contrib import admin from allauth.account.views import LoginView from contributors.views import ContributorView, logout_view from organizations.views import HomePageView urlpatterns = [ url(r'^admin/', include(admin.site.urls)), url(r'^$', HomePageView.as_view(), name='home'), url(r'^contributor/$', ContributorView.as_view(), name='contributor'), url(r'^login/$', LoginView.as_view(), name='login'), url(r'^signout/$', LoginView.as_view(), name='account_signup'), url(r'^logout/$', logout_view, name='logout'), ]
logged_users_redirect = user_passes_test(lambda u: u.is_anonymous, "/") urlpatterns = [ path("", include("app.urls")), path("api-v1/", include(router.urls)), path("api-auth/", include("rest_auth.urls")), path("api-auth/registration/", include("rest_auth.registration.urls")), path( "users/signup", SignupView.as_view(template_name="registration/signup.html"), name="account_signup", ), path( "users/login", logged_users_redirect( LoginView.as_view(template_name="registration/login.html")), name="account_login", ), path( "users/logout", LogoutView.as_view(template_name="registration/logout.html"), name="account_logout", ), path( "users/reset", logged_users_redirect( PasswordResetView.as_view( template_name="registration/password_reset_form.html")), name="account_reset_password", ), url(
path("home/", views.LandingPage.as_view(), name="home"), path("profile/", views.Profile.as_view(), name="profile"), path("profile/<slug:slug>", views.Profile.as_view(), name="profile"), path("logdata/", views.LogData.as_view(), name="logdata"), path("logs/", views.ViewLogs.as_view(), name="logs"), path("logdata/<pk>/update/", views.UpdateLogData.as_view(), name="UpdateLogData"), path("logdata/<pk>/delete/", views.DeleteLogData.as_view(), name="DeleteLogData"), path("analytics/<uuid>/", views.Analytics.as_view(), name="analytics"), path("analytics/", views.Analytics.as_view(), name="analytics"), # AUTH path("register/", views.Register.as_view(), name="register"), path("login/", AllAuthLoginView.as_view(), name="login"), path("logout/", views.Logout.as_view(), name="logout"), path("change-password/", views.PasswordChange.as_view(), name="change-password"), path("settings/", views.Settings.as_view(), name="settings"), path("feedback/", views.Feedback.as_view(), name="feedback"), # IMPORT path("import/csv", views.ImportCSV.as_view(), name="importcsv"), path("import/mfp", views.ImportMFP.as_view(), name="importmfp"), path( "import/credentials/mfp/", views.ImportMFPCredentials.as_view(), name="import-credentials-mfp", ), path(
from allauth.account.forms import LoginForm, ResetPasswordForm from allauth.account.views import LoginView, PasswordResetView from captcha.fields import ReCaptchaField from captcha.widgets import ReCaptchaV2Invisible class CaptchaResetPasswordForm(ResetPasswordForm): captcha = ReCaptchaField(widget=ReCaptchaV2Invisible, label="") password_reset_view = PasswordResetView.as_view( form_class=CaptchaResetPasswordForm) class CaptchaLoginForm(LoginForm): captcha = ReCaptchaField(widget=ReCaptchaV2Invisible, label="") login_view = LoginView.as_view(form_class=CaptchaLoginForm)
from .views import user_details,\ HomeView, UserListView, RegistrationView,\ ProfileView, EditProfileView from allauth.account.views import LoginView, LogoutView, PasswordResetView urlpatterns = [ path('home', HomeView.as_view(), name='home'), path('details/<str:pk>', user_details, name='user_detail'), path('users_list', UserListView.as_view(), name='list'), path('signup', RegistrationView.as_view(), name='registration'), path('profile/<str:pk>', ProfileView.as_view(), name='profile'), path('accounts/profile/edit', EditProfileView.as_view(), name='edit_profile'), path('contacts', views.contactform, name='contacts'), path('thanks', views.thanks, name='thanks'), path('login', LoginView.as_view(), name='custom_login'), path('logout', LogoutView.as_view(), name='custom_logout'), path('password_reset', PasswordResetView.as_view(), name='custom_reset_password'), path('dialogs', login_required(views.DialogsView.as_view()), name='dialogs'), path('dialogs/create/<str:user_id>', login_required(views.CreateDialogView.as_view()), name='create_dialog'), path('dialogs/<str:chat_id>', login_required(views.MessagesView.as_view()), name='messages'), ]
from django.urls import path from allauth.account.views import LoginView, LogoutView from .views import UserPage, upgrade_me, EditProfile urlpatterns = [ path('login/', LoginView.as_view(template_name='account/login.html'), name='login'), path('logout/', LogoutView.as_view(template_name='account/logout.html'), name='logout'), path('', UserPage.as_view(), name='mypage'), path('upgrade/', upgrade_me, name = 'upgrade'), path('edit/<int:pk>', EditProfile.as_view(), name= 'edit') ]
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 importlib import import_module from django.contrib import admin from django.urls import path, include from allauth.account.views import LoginView, LogoutView from allauth.socialaccount import providers urlpatterns = [ path("admin/", admin.site.urls), path("login/", LoginView.as_view(), name="account-login"), path("", LoginView.as_view(), name="home"), path("logout/", LogoutView.as_view(), name="account-logout"), path("social/", include("allauth.socialaccount.urls")), path("registration/", include("registration.urls"), name="registration"), ] # for django-allauth # Provider urlpatterns, as separate attribute (for reusability). provider_urlpatterns = [] for provider in providers.registry.get_list(): try: prov_mod = import_module(provider.get_package() + ".urls") except ImportError: continue prov_urlpatterns = getattr(prov_mod, "urlpatterns", None)
from django.contrib import admin from django.contrib.auth.decorators import user_passes_test from django.urls import include, path from .api import router logged_users_redirect = user_passes_test(lambda u: u.is_anonymous, "/") urlpatterns = [ path("", include("app.urls")), path("api-v1/", include(router.urls)), path("api-auth/", include("rest_auth.urls")), path("api-auth/registration/", include("rest_auth.registration.urls")), # path("signup/", SignupView.as_view(), name="account_signup"), path("login/", logged_users_redirect(LoginView.as_view()), name="account_login"), path("logout/", LogoutView.as_view(), name="account_logout"), path( "password/reset/", logged_users_redirect(PasswordResetView.as_view()), name="account_reset_password", ), url( r"^users/password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$", logged_users_redirect(PasswordResetFromKeyView.as_view()), name="account_reset_password_from_key", ), path( "password/reset/key/done/", logged_users_redirect(PasswordResetFromKeyDoneView.as_view()),
def home_redirect(request): if request.user.is_authenticated: return LoginView.as_view()(request) else: return views.HomePageView.as_view()(request)
from allauth.account.views import LoginView, LogoutView from django.urls import path from django.views.generic import RedirectView from apps.autenticacao.forms import FormularioLogin urlpatterns = [ path('login/', LoginView.as_view(template_name='autenticacao/login.html', form_class=FormularioLogin), name='account_login'), path('logout/', LogoutView.as_view(template_name='autenticacao/logout.html'), name='account_logout'), path('', RedirectView.as_view(url='login', permanent=True), name='account_signup'), ]
from django.urls import path, include from django.contrib import admin from core import views from allauth.account import views as allauth_views from allauth.account.views import LoginView as lv urlpatterns = [ path('log', views.log), path('dash', views.dash), path('dashboard', views.dashboard, name="dash_log"), path("login/", lv.as_view(), name="account_login"), path('', allauth_views.LoginView.as_view()), path('logout', allauth_views.LogoutView.as_view()), path('launch', views.launch) ]
from django.conf.urls import include, patterns, url from django.views.generic.base import RedirectView from allauth.account.views import LoginView from . import views from .forms import LoginForm urlpatterns = patterns('', url(r'^$', RedirectView.as_view(pattern_name='profile')), url(r'^login/$', LoginView.as_view(form_class=LoginForm), name='account_login'), url(r'^pending/$', views.PendingUsersView.as_view(), name='pending_users'), url(r'^pending/action/(?P<profile_id>\d+)/$', views.which_action, name='pending_action'), url(r'^inactive/$', views.AccountInactiveView.as_view(), name='account_inactive'), url(r'^confirm-email/$', views.EmailVerificationSentView.as_view(), name="account_email_verification_sent"), url(r'^profile/', include('profiles.urls')), url(r'^', include('allauth.urls')), )
"""project URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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 django.urls import path, include from allauth.account.views import SignupView, LoginView, LogoutView from . import views from users import urls app_name = 'users' urlpatterns = [ path('signup', SignupView.as_view(), name="account_signup"), # account_signup path('login', LoginView.as_view(), name="account_login"), # account_login path('logout', LogoutView.as_view(), name="account_logout"), # account_logout path('mypage', views.mypage, name="mypage"), path('coin_add/<int:amount>', views.coin_add, name="coin_add"), path('coin_sub/<int:amount>', views.coin_sub, name="coin_sub"), ]
def mock_login_form(request): login_view = LoginView() login_view.request = request login_view.template_name = "account/login_short.html" return login_view.get(request).render().content
# you may want to take out api-auth and have all traffic through rest-auth instead # im not sure if you even use rest_framework/api-auth anymore url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), # https://github.com/Tivix/django-rest-auth/issues/159#issuecomment-173909852 url(r'^rest-auth/login/$', LoginViewCustom.as_view(), name='rest_login'), url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), # url(r'^rest-auth/github/$', GitHubLoginView.as_view(), name='github_login'), # url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'), url(r'^login/$', LoginView.as_view()), url(r'^logout/$', LogoutView.as_view()), url(r'^session-logout/$', SessionLogoutView.as_view()), ] # might have to double check this, not sure why MEDIA is so oddly pronounced urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception('Bad Request!')}), url(r'^403/$',
from myapp.views import * urlpatterns = [ url(r'^api-token-auth/', obtain_jwt_token), url(r'^api-token-refresh/', refresh_jwt_token), url(r'^api-token-verify/', verify_jwt_token), # API Documentation url url(r'^apiDoc/', schema_view), # All Auth URLS path('account/', include('allauth.urls')), path('account/avatar/', include('avatar.urls')), path('account/profile/', include('userprofiles.urls')), url(r'^$', LoginView.as_view(), name='login'), url(r'^home/', login_required(HomePageView.as_view()), name='home'), # Display Openlayers map url(r'^map/', MapPageView.as_view(), name='map'), # Display data url(r'^operators/', OperatorView.as_view({'get': 'list'})), # Count all providers url(r'^providers/', CountView.as_view({'get': 'list'})), # Statistic Charts path('levelStats/', StatisticsView.as_view({'get': 'list'})), # Statistic Charts
url(r'^settings/$', REACT_DASHBOARD_TEMPLATE_VIEW, name='react-settings'), # you may want to take out api-auth and have all traffic through rest-auth instead # im not sure if you even use rest_framework/api-auth anymore url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), # https://github.com/Tivix/django-rest-auth/issues/159#issuecomment-173909852 url(r'^rest-auth/login/$', LoginViewCustom.as_view(), name='rest_login'), url(r'^rest-auth/', include('rest_auth.urls')), url(r'^rest-auth/registration/account-confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name='account_confirm_email'), url(r'^rest-auth/registration/', include('rest_auth.registration.urls')), # url(r'^rest-auth/github/$', GitHubLoginView.as_view(), name='github_login'), # url(r'^rest-auth/facebook/$', FacebookLogin.as_view(), name='fb_login'), url(r'^login/$', LoginView.as_view()), url(r'^logout/$', LogoutView.as_view()), url(r'^session-logout/$', SessionLogoutView.as_view()), ] # might have to double check this, not sure why MEDIA is so oddly pronounced urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', default_views.bad_request, kwargs={'exception': Exception('Bad Request!')}), url(r'^403/$', default_views.permission_denied, kwargs={'exception': Exception('Permission Denied')}), url(r'^404/$', default_views.page_not_found, kwargs={'exception': Exception('Page not Found')}), url(r'^500/$', default_views.server_error),
"""hookup URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.0/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 django.contrib import admin from django.urls import path, include from allauth.account.views import LoginView urlpatterns = [ path('adminx/', admin.site.urls), path('login/', LoginView.as_view(), name='login'), path('', include('allauth.urls')), path('messages/', include('chat.urls')), path('', include('matchmaker.urls', namespace='matchmaker')), ]
from allauth.account.views import LoginView, AccountInactiveView, LogoutView # from allauth.socialaccount.views import S from allauth.socialaccount.providers.oauth2.urls import default_urlpatterns from allauth.socialaccount.providers.google.provider import GoogleProvider from allauth.socialaccount.views import SignupView urlpatterns = [ # Django Admin path('admin/', admin.site.urls), path('', include('core.urls')), # User management # path('users_app/', include('users_app.urls')), path('accounts/signup/', views.SignupView.as_view(), name="account_signup"), path('accounts/login/', LoginView.as_view(), name="account_login"), path('accounts/logout/', LogoutView.as_view(), name="account_logout"), path('accounts/inactive', AccountInactiveView.as_view(), name="account_inactive"), path('accounts/socialaccount_signup', SignupView.as_view(), name='socialaccount_signup'), # path('accounts/socialaccount_signup', SignupView.as_view(), name='socialaccount_signup'), path('accounts/', include(default_urlpatterns(GoogleProvider))), # path('accounts/', include('allauth.urls')), ] if settings.DEBUG: urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/2.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 django.contrib import admin from django.urls import path, include from django.contrib.auth.views import LogoutView from allauth.account.views import LoginView urlpatterns = [ path('polling/', include('polling.urls')), path('admin/', admin.site.urls), path('', include('blogging.urls')), #path('login/', LoginView.as_view(template_name='login.html'), name="login"), path('login/', LoginView.as_view(template_name='login.html'), name="account_login"), path('logout/', LogoutView.as_view(next_page='/'), name="logout"), path('accounts/', include('allauth.urls')), ]
# password reset url(r'^password/reset/$', AllAuthPasswordResetView.as_view(form_class=AllAuthResetPasswordForm), name="password_reset"), url(r'^password/reset/done/$', AllAuthPasswordResetDoneView.as_view(), name="account_reset_password_done"), # url(r'^password/reset/key/(?P<uidb36>[0-9A-Za-z]+)-(?P<key>.+)/$', AllAuthPasswordResetFromKeyView.as_view(form_class=AllAuthResetPasswordKeyForm), name="account_reset_password_from_key"), url(r'^password/reset/key/done/$', AllAuthPasswordResetFromKeyDoneView, name="account_reset_password_from_key_done"), # Login url(r'^login/$', LoginView.as_view(form_class=AllAuthLoginForm, template_name='registration/login.html'), name='login'), # url(r'^logout/$', login_required(LogoutView.as_view()), name='logout'), # url(r'^login/$', views.CustomLoginView.as_view(form_class=AllAuthLoginForm, template_name='registration/login.html'), name='login'), url(r'^logout/$', login_required(views.CustomLogoutView.as_view()), name='logout'), # E-mail url(r'^email/$', views.AllAuthEmailView.as_view(), name="account_email"), re_path(r'^confirm-email/(?P<key>[-:\w]+)/$', ConfirmEmailView.as_view(), name="confirm_email"), # change password url(r'^password-change/$',
from django.contrib import admin from django.urls import path, include, re_path from allauth.account.views import LoginView, ConfirmEmailView from allauth.account import views as allauth_views urlpatterns = [ path('admin/', admin.site.urls), path('', LoginView.as_view(), name="login"), # re_path(r"^confirm-email/(?P<key>[-:\w]+)/$", ConfirmEmailView.as_view(), name="account_confirm_email"), path('', include('allauth.urls')), path('', allauth_views.login, name="account_login"), path('accueil/', include('accueil.urls')), ]
r'^news/', include('news.urls', namespace='news') ), url( r'^contact/', TemplateView.as_view(template_name='contact.html'), name='contact' ), url( r'^conduct/', TemplateView.as_view(template_name='coc.html'), name='conduct' ), url( r'^login/$', LoginView.as_view(), name='account_login', ), url( r'^logout/$', LogoutView.as_view(), name='account_logout', ), url( r'^privacy-policy/$', TemplateView.as_view(template_name='legal/privacy_policy.html'), name='privacy-policy' ), url( r'^general-terms-and-conditions/$', TemplateView.as_view(template_name='legal/general_terms_and_conditions.html'),
from django.utils.decorators import method_decorator from allauth.account.views import LoginView from axes.decorators import axes_dispatch from axes.decorators import axes_form_invalid from humans.forms import LoginForm LoginView.dispatch = method_decorator(axes_dispatch)(LoginView.dispatch) LoginView.form_invalid = method_decorator( axes_form_invalid)(LoginView.form_invalid) urlpatterns = [ url(r'^admin/login/$', admin.site.login), url(r'^admin/', admin.site.urls), url(r'^users/login/$', LoginView.as_view(form_class=LoginForm), name='account_login'), url(r'^users/', include('allauth.urls')), url(r'^users/', include('humans.urls')), url(r'^box/', include('boxes.urls')), url(r'^', include('pages.urls')) ] urlpatterns += i18n_patterns( url(r'^', include('pages.urls')), ) if settings.DEBUG: import debug_toolbar urlpatterns = [ url(r'^__debug__/', include(debug_toolbar.urls)),
from django.contrib import admin admin.autodiscover() from schedule.views import CreatePost, EditPost, calendar_view, PostViewSet from schedule.models import Post from rest_framework import viewsets, routers class PostViewSet(viewsets.ModelViewSet): model = Post router = routers.DefaultRouter() router.register(r'post', PostViewSet) urlpatterns = patterns('', url(r'^accounts/login/', LoginView.as_view(template_name='registration/login.html'), name="custom_login"), (r'^accounts/', include('allauth.urls')), url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')), url(r'^$', calendar_view, name="home_calendar_index"), url(r'^', include(router.urls)), url(r'^create/(?P<year>\d{4})/(?P<month>\d{2})/(?P<day>\d{2})$', CreatePost.as_view(), name='create_post'), url(r'^update/(?P<id>\d+)/$', EditPost.as_view(), name='edit_post'), url(r'^cal/$', calendar_view, name='post_calendar_index'), url(r'^cal/(?P<year>\d{4})/(?P<month>\d{2})/$', calendar_view, name='post_calendar'), url(r'^suggestion/', TemplateView.as_view(template_name="forms/suggestion.html"), name="suggestion"), )
from django.conf.urls import include, patterns, url from django.views.generic.base import RedirectView from allauth.account.views import LoginView from . import views from .forms import LoginForm urlpatterns = patterns( '', url(r'^$', RedirectView.as_view(pattern_name='profile')), url(r'^login/$', LoginView.as_view(form_class=LoginForm), name='account_login'), url(r'^pending/$', views.PendingUsersView.as_view(), name='pending_users'), url(r'^pending/action/(?P<profile_id>\d+)/$', views.which_action, name='pending_action'), url(r'^inactive/$', views.AccountInactiveView.as_view(), name='account_inactive'), url(r'^confirm-email/$', views.EmailVerificationSentView.as_view(), name="account_email_verification_sent"), url(r'^profile/', include('profiles.urls')), url(r'^', include('allauth.urls')), )