Beispiel #1
0
    '',
    # URLs that do not require a session or valid token
    url(r'^password/reset/$',
        cache_page(0)(PasswordReset.as_view()),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$',
        cache_page(0)(PasswordResetConfirm.as_view()),
        name='rest_password_reset_confirm'),
    url(r'^login/$', cache_page(0)(Login.as_view()), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$', cache_page(0)(Logout.as_view()), name='rest_logout'),
    url(r'^user/$',
        cache_page(0)(UserDetails.as_view()),
        name='rest_user_details'),
    url(r'^password/change/$',
        cache_page(0)(PasswordChange.as_view()),
        name='rest_password_change'),
)

apipatterns = patterns(
    '',
    url(r'^$',
        login_required(cache_page(60 * 60)(APIRoot.as_view())),
        name='root_listing'),
    url(r'^explore/',
        include('rest_framework_swagger.urls', namespace='swagger')),
    url(r'^common/', include('common.urls', namespace='common')),
    url(r'^users/', include('users.urls', namespace='users')),
    url(r'^facilities/', include('facilities.urls', namespace='facilities')),
    url(r'^chul/', include('chul.urls', namespace='chul')),
    url(r'^gis/', include('mfl_gis.urls', namespace='mfl_gis')),
Beispiel #2
0
from rest_auth.views import Login, Logout, Register, UserDetails, \
    PasswordChange, PasswordReset, VerifyEmail, PasswordResetConfirm


urlpatterns = patterns('rest_auth.views',
                       # URLs that do not require a session or valid token
                       url(r'^register/$', Register.as_view(),
                           name='rest_register'),
                       url(r'^password/reset/$', PasswordReset.as_view(),
                           name='rest_password_reset'),
                       url(r'^password/reset/confirm/(?P<uid>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
                           PasswordResetConfirm.as_view(
                           ), name='rest_password_reset_confirm'),
                       url(r'^login/$', Login.as_view(), name='rest_login'),
                       url(r'^verify-email/(?P<activation_key>\w+)/$',
                           VerifyEmail.as_view(), name='verify_email'),

                       # URLs that require a user to be logged in with a valid
                       # session / token.
                       url(r'^logout/$', Logout.as_view(), name='rest_logout'),
                       url(r'^user/$', UserDetails.as_view(),
                           name='rest_user_details'),
                       url(r'^password/change/$', PasswordChange.as_view(),
                           name='rest_password_change'),
                       )

if getattr(settings, 'IS_TEST', False):
    from django.contrib.auth.tests import urls
    urlpatterns += patterns('', url(r'^test-admin/', include(urls)))
Beispiel #3
0
    # URLs that do not require a session or valid token
    url(r'^password/reset/$',
        cache_page(0)(PasswordReset.as_view()),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$',
        cache_page(0)(PasswordResetConfirm.as_view()),
        name='rest_password_reset_confirm'),
    url(r'^login/$',
        cache_page(0)(Login.as_view()), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$',
        cache_page(0)(Logout.as_view()), name='rest_logout'),
    url(r'^user/$',
        cache_page(0)(UserDetails.as_view()), name='rest_user_details'),
    url(r'^password/change/$',
        cache_page(0)(PasswordChange.as_view()), name='rest_password_change'),
)

apipatterns = patterns(
    '',
    url(r'^$', login_required(
        cache_page(60*60)(APIRoot.as_view())), name='root_listing'),
    url(r'^explore/', include('rest_framework_swagger.urls',
        namespace='swagger')),
    url(r'^common/', include('common.urls', namespace='common')),
    url(r'^users/', include('users.urls', namespace='users')),
    url(r'^facilities/', include('facilities.urls', namespace='facilities')),
    url(r'^chul/', include('chul.urls', namespace='chul')),
    url(r'^gis/', include('mfl_gis.urls', namespace='mfl_gis')),
    url(r'^reporting/', include('reporting.urls', namespace='reporting')),
    url(r'^rest-auth/', include(rest_auth_patterns, namespace='rest_auth')),
Beispiel #4
0
from django.conf.urls import patterns, url

from rest_auth.views import (Login, Logout, UserDetails, PasswordChange,
                             PasswordReset, PasswordResetConfirm)

urlpatterns = patterns(
    '',
    # URLs that do not require a session or valid token
    url(r'^password/reset/$',
        PasswordReset.as_view(),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$',
        PasswordResetConfirm.as_view(),
        name='rest_password_reset_confirm'),
    url(r'^login/$', Login.as_view(), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$', Logout.as_view(), name='rest_logout'),
    url(r'^user/$', UserDetails.as_view(), name='rest_user_details'),
    url(r'^password/change/$',
        PasswordChange.as_view(),
        name='rest_password_change'),
)
Beispiel #5
0
from rest_auth.views import Login, lsp_login, Logout, Register, UserDetails, \
    PasswordChange, PasswordReset, VerifyEmail, PasswordResetConfirm


urlpatterns = patterns('rest_auth.views',
                       # URLs that do not require a session or valid token
                       url(r'^register/$', Register.as_view(),
                           name='rest_register'),
                       url(r'^password/reset/$', PasswordReset.as_view(),
                           name='rest_password_reset'),
                       url(r'^password/reset/confirm/(?P<uid>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
                           PasswordResetConfirm.as_view(
                           ), name='rest_password_reset_confirm'),
                       url(r'^login/$', Login.as_view(), name='rest_login'),
                       url(r'^v1/login/$', lsp_login.as_view(), name='rest_lsplogin'),
                       url(r'^verify-email/(?P<activation_key>\w+)/$',
                           VerifyEmail.as_view(), name='verify_email'),

                       # URLs that require a user to be logged in with a valid
                       # session / token.
                       url(r'^logout/$', Logout.as_view(), name='rest_logout'),
                       url(r'^user/$', UserDetails.as_view(),
                           name='rest_user_details'),
                       url(r'^(?P<username>.*)/password/change/$', PasswordChange.as_view(),
                           name='rest_password_change'),
                       )

if getattr(settings, 'IS_TEST', False):
    from django.contrib.auth.tests import urls
    urlpatterns += patterns('', url(r'^test-admin/', include(urls)))
Beispiel #6
0
    # URLs that do not require a session or valid token
    url(r'^password/reset/$',
        cache_page(0)(PasswordReset.as_view()),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$',
        cache_page(0)(PasswordResetConfirm.as_view()),
        name='rest_password_reset_confirm'),
    url(r'^login/$',
        cache_page(0)(Login.as_view()), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$',
        cache_page(0)(Logout.as_view()), name='rest_logout'),
    url(r'^user/$',
        cache_page(0)(UserDetails.as_view()), name='rest_user_details'),
    url(r'^password/change/$',
        cache_page(0)(PasswordChange.as_view()), name='rest_password_change'),
)

apipatterns = patterns(
    '',
    url(r'^$', login_required(
        cache_page(60*60)(APIRoot.as_view())), name='root_listing'),
    url(r'^explore/', include('rest_framework_swagger.urls',
        namespace='swagger')),
    url(r'^common/', include('common.urls', namespace='common')),
    url(r'^users/', include('users.urls', namespace='users')),
    url(r'^facilities/', include('facilities.urls', namespace='facilities')),
    url(r'^chul/', include('chul.urls', namespace='chul')),
    url(r'^gis/', include('mfl_gis.urls', namespace='mfl_gis')),
    url(r'^reporting/', include('reporting.urls', namespace='reporting')),
    url(r'^admin_offices/', include('admin_offices.urls', namespace='admin_offices')),
Beispiel #7
0
from allauth.account.views import ConfirmEmailView
from django.conf.urls import patterns, include, url
from django.contrib import admin
from rest_auth.views import PasswordReset, PasswordResetConfirm, UserDetails, PasswordChange

urlpatterns = patterns('', # REST-AUTH
                       # instead of using all possible url, we only need these:
                       url(r'^rest-auth/password/reset/$', PasswordReset.as_view(),
                           name='rest_password_reset'),
                       url(r'^rest-auth/password/reset/confirm/$', PasswordResetConfirm.as_view(),
                           name='rest_password_reset_confirm'),
                       url(r'^rest-auth/user/$', UserDetails.as_view(), name='rest_user_details'),
                       url(r'^rest-auth/password/change/$', PasswordChange.as_view(),
                           name='rest_password_change'),

                       # restauth does not provide a default solution for the web view, when the email got confirmed
                       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')),

                       ## ALLAUTH
                       url(r'^accounts/', include('allauth.urls')), ## OAUTH TOOLKIT
                       # using oauth 2.0 as authentication method
                       url(r'^oauth/', include('oauth2_provider.urls', namespace='oauth2_provider')),

                       # DEFAULT ADMIN
                       url(r'^admin/', include(admin.site.urls)), )
Beispiel #8
0
from django.conf.urls import patterns, url

from rest_auth.views import (
    Login, Logout, UserDetails, PasswordChange,
    PasswordReset, PasswordResetConfirm
)

urlpatterns = patterns(
    '',
    # URLs that do not require a session or valid token
    url(r'^password/reset/$', PasswordReset.as_view(),
        name='rest_password_reset'),
    url(r'^password/reset/confirm/$', PasswordResetConfirm.as_view(),
        name='rest_password_reset_confirm'),
    url(r'^login/$', Login.as_view(), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$', Logout.as_view(), name='rest_logout'),
    url(r'^user/$', UserDetails.as_view(), name='rest_user_details'),
    url(r'^password/change/$', PasswordChange.as_view(),
        name='rest_password_change'),
)
Beispiel #9
0
from django.conf.urls import patterns, url

from rest_auth.views import (Login, Logout, UserDetails, PasswordChange,
  PasswordReset, PasswordResetConfirm)

urlpatterns = patterns('',
    # URLs that do not require a session or valid token
    url(r'^password/reset/$', PasswordReset.as_view(), name='rest_password_reset'),
    url(r'^password/reset/confirm/$', PasswordResetConfirm.as_view(), name='rest_password_reset_confirm'),
    url(r'^login/$', Login.as_view(), name='rest_login'),
    # URLs that require a user to be logged in with a valid session / token.
    url(r'^logout/$', Logout.as_view(), name='rest_logout'),
    url(r'^user/$', UserDetails.as_view(), name='rest_user_details'),
    url(r'^password/change/$', PasswordChange.as_view(), name='rest_password_change'),
)