Esempio n. 1
0
from django.urls import path
from django.contrib.auth import views as django_auth_views

from auth.views import LoginView

urlpatterns = [
    path('login/', LoginView.as_view(), name='login'),
    path('logout/', django_auth_views.logout_then_login, name='logout'),
]
Esempio n. 2
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from auth.views import RegistrationView, LoginView, LogoutView, ProfileDetailView


urlpatterns = patterns(
    "",
    url(r"^login/$", LoginView.as_view(template_name="auth/login.html"), name="auth_login"),
    url(r"^logout/$", LogoutView.as_view(), name="auth_logout"),
    url(r"^register/$", RegistrationView.as_view(template_name="auth/register.html"), name="auth_registration"),
    url(r"^complete/$", TemplateView.as_view(template_name="auth/complete.html"), name="auth_registration_complete"),
    url(
        r"^profile/(?P<username>[\w\._-]+)/$",
        ProfileDetailView.as_view(template_name="auth/profile.html"),
        name="auth_profile",
    ),
)
Esempio n. 3
0
from django.conf.urls import url
from django.views.generic import TemplateView
from django.contrib.auth import views

from auth.views import (RegistrationView, LoginView, LogoutView,
                        ProfileDetailView, ProfileUpdateView)

urlpatterns = [
    url(r'^login/$',
        LoginView.as_view(template_name="auth/login.html"),
        name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^auth/profile$',
        ProfileUpdateView.as_view(template_name="auth/update.html"),
        name='auth_profile_update'),
    url(r'^register/$',
        RegistrationView.as_view(template_name="auth/register.html"),
        name='auth_registration'),
    url(r'^complete/$',
        TemplateView.as_view(template_name="auth/complete.html"),
        name='auth_registration_complete'),
    url(r'^users/(?P<username>[\w\._-]+)$',
        ProfileDetailView.as_view(template_name="auth/profile.html"),
        name='auth_profile'),
]
Esempio n. 4
0
    TokenVerifyView
)

from django.conf import settings
from auth.views import LoginView, LogoutView

rest_auth_registration_urls = [
    # allauth login/logout/password
    re_path(r"^registration/$", RegisterView.as_view(), name="account_signup"),
    re_path(r"^registration/verify-email/$",VerifyEmailView.as_view(),name="rest_verify_email",)
]


urlpatterns = [
    # rest_auth login/logout/password
    re_path(r"^login/$", LoginView.as_view(), name="rest_login"),
    re_path(r"^logout/$", LogoutView.as_view(), name="rest_logout"),
    re_path(r"^password/reset/$", PasswordResetView.as_view(), name="rest_password_reset"),
    re_path(r"^password/reset/confirm/$",PasswordResetConfirmView.as_view(),name="rest_password_reset_confirm",),
    re_path(r"^password/change/$", PasswordChangeView.as_view(), name="rest_password_change" ),

    #rest_framework_simplejwt
    re_path(r"^token/obtain/$", TokenObtainPairView.as_view(), name='token_obtain_pair'),
    re_path(r"^token/refresh/$", TokenRefreshView.as_view(), name='token_refresh'),
    re_path(r"^token/verify/$", TokenVerifyView.as_view(), name='token_verify'),

]

if settings.AUTH_ALLOW_REGISTRATION:
    urlpatterns += rest_auth_registration_urls
Esempio n. 5
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from auth.views import RegistrationView, LoginView, LogoutView, ProfileDetailView


urlpatterns = patterns('',

    url(r'^login/$', LoginView.as_view(template_name="auth/login.html"), name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^register/$', RegistrationView.as_view(
        template_name="auth/register.html"), name='auth_registration'),
    url(r'^complete/$', TemplateView.as_view(
        template_name="auth/complete.html"), name='auth_registration_complete'),
    url(r'^profile/(?P<username>[\w\._-]+)/$', ProfileDetailView.as_view(
        template_name="auth/profile.html"), name='auth_profile'),

)
Esempio n. 6
0
from django.conf.urls import url

from auth.views import LoginView, LogoutView

urlpatterns = [
    url(r'^login$', LoginView.as_view()),
    url(r'^logout$', LogoutView.as_view()),
]
Esempio n. 7
0
from monitor.apis import recieve_data
from auth.views import LoginView
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from monitor.views import IpControlView
from monitor.views import add_ip, delete_ip
from monitor.views import sendmail
from monitor.views import SitesView, delete_site, change_record_state
from monitor.views import search
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'^$', HomeView.as_view(), name="home"),
    url(r'^login$', LoginView.as_view(), name="login"),
    url(r'^logoff$', 'auth.views.logoff', name='logoff'),
    url(r'^api/test$', recieve_data, name="recieve"),
    url(r'^records$', RecordViews.as_view(), name="records"),
    url(r'^record/update$', change_record_state, name="update_record_state"),
    url(r'^watchsites$', SitesView.as_view(), name="sites"),
    url(r'^watchsites/add$', SitesView.as_view(), name="add_site"),
    url(r'^watchsites/delete/(?P<pk>\d+)$', delete_site, name="delete_site"),
    url(r'^track$', TrackView.as_view(), name="track"),
    url(r'^track/user$', PageView.as_view(), name="pageview"),
    url(r'^track/user/(?P<pk>\d+)$', PageView.as_view(), name="pageview"),
    url(r'^words', include('monitor.urls')),

    # url(r'^insight/', include('insight.foo.urls')),
    url(r'^auth', include('auth.urls')),
    url(r'^whitelist/add$', add_ip, name='add_ip'),
Esempio n. 8
0
from django.conf.urls import patterns, url
from django.views.generic import TemplateView
from auth.views import RegistrationView, LoginView, LogoutView, ProfileDetailView


urlpatterns = patterns('',

    url(r'^login/$', LoginView.as_view(template_name="auth/login.html"), name='auth_login'),
    url(r'^logout/$', LogoutView.as_view(), name='auth_logout'),
    url(r'^register/$', RegistrationView.as_view(
        template_name="auth/register.html"), name='auth_registration'),
    url(r'^complete/$', TemplateView.as_view(
        template_name="auth/complete.html"), name='auth_registration_complete'),
    url(r'^profile/(?P<username>[-\w]+)/$', ProfileDetailView.as_view(
        template_name="auth/profile.html"), name='auth_profile'),

)