Beispiel #1
0
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")
Beispiel #2
0
        # 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,
    # but it's not satisfying because of the non-i18n nature of
    # account's URLs.
    #
    # lambda r: HttpResponseRedirect(reverse_lazy('account_login')),
    # name='signin'),
    # lambda r: HttpResponseRedirect(reverse_lazy('account_logout')),
    # name='signout'),

else:
Beispiel #3
0
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"),
)
Beispiel #4
0
#TEST DJANGO-REST
if 'rest_framework' in settings.INSTALLED_APPS:

    from rest_framework.authtoken import views
    from account.views import SettingsView
    
    urlpatterns += patterns('',
        url(r'^api-auth/', include('rest_framework.urls',
                               namespace='rest_framework')),
#        url(r'^api-token-auth/', views.obtain_auth_token), 

        #si utilisation djoser account (en test)
        #url(r'^auth/', include('djoser.urls')),

        #mapping pinax 'account'
        url(r"^accounts/profile/$", SettingsView.as_view(), name="account_settings"),
    )

if 'adminactions' in settings.INSTALLED_APPS:
    from django.contrib.admin import site
    import adminactions.actions as actions
    actions.add_to_site(site)

    urlpatterns += patterns('',
    (r'^adminactions/', include('adminactions.urls')),
    )
   
if 'xadmin' in settings.INSTALLED_APPS:
    import xadmin
    xadmin.autodiscover()
    
from django.contrib import admin
from django.urls import path, include
from django.contrib.auth import views as auth_views
from account.views import IndexView, SettingsView
from django.conf import settings

from sso_email_user.server import Server
sso_server = Server()

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('jet/', include('jet.urls', 'jet')),
    path('admin/', admin.site.urls),
    path('settings/', SettingsView.as_view(), name='settings'),
    path('login/',
         auth_views.LoginView.as_view(),
         {'template_name': 'account/login.html'},
         name='login'),
    path('logout/', auth_views.LogoutView.as_view(redirect_field_name='next')),
]
if settings.IS_SSO_SERVER:
    urlpatterns.insert(3, path('server/', include(sso_server.get_urls())))
else:
    from sso_email_user.client import Client
    sso_client = Client(settings.SSO_SERVER, settings.SSO_PUBLIC_KEY,
                        settings.SSO_PRIVATE_KEY)
    sso_client.user_extra_data = ['lang']
    urlpatterns.insert(3, path('client/', include(sso_client.get_urls())))
Beispiel #6
0
from django.urls import path, re_path
from account.views import (
    ChangePasswordView,
    ConfirmEmailView,
    DeleteView,
    LoginView,
    LogoutView,
    PasswordResetTokenView,
    PasswordResetView,
    SettingsView,
    SignupView,
)

urlpatterns = [
    path('signup/', SignupView.as_view(), name="account_signup"),
    path('login/', LoginView.as_view(), name="account_login"),
    path('logout/', LogoutView.as_view(), name="account_logout"),
    re_path(r'^confirm_email/(?P<key>\w+)/$',
            ConfirmEmailView.as_view(),
            name="account_confirm_email"),
    path('password/', ChangePasswordView.as_view(), name="account_password"),
    path('password/reset/',
         PasswordResetView.as_view(),
         name="account_password_reset"),
    re_path(r'^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$',
            PasswordResetTokenView.as_view(),
            name="account_password_reset_token"),
    path('settings/', SettingsView.as_view(), name="account_settings"),
    path('delete/', DeleteView.as_view(), name="account_delete"),
]
Beispiel #7
0
    from rest_framework.authtoken import views
    from account.views import SettingsView

    urlpatterns += patterns(
        '',
        url(r'^api-auth/',
            include('rest_framework.urls', namespace='rest_framework')),
        #        url(r'^api-token-auth/', views.obtain_auth_token),

        #si utilisation djoser account (en test)
        #url(r'^auth/', include('djoser.urls')),

        #mapping pinax 'account'
        url(r"^accounts/profile/$",
            SettingsView.as_view(),
            name="account_settings"),
    )

if 'adminactions' in settings.INSTALLED_APPS:
    from django.contrib.admin import site
    import adminactions.actions as actions
    actions.add_to_site(site)

    urlpatterns += patterns(
        '',
        (r'^adminactions/', include('adminactions.urls')),
    )

if 'xadmin' in settings.INSTALLED_APPS:
    import xadmin
Beispiel #8
0
v1_api.register(BookmarkResource())
v1_api.register(ListResource())
v1_api.register(UserResource())
v1_api.register(FeedbackResource())
v1_api.register(FollowResource())
v1_api.register(CommentResource())
v1_api.register(ListInvitationResource())
v1_api.register(UserTourResource())
v1_api.register(FeedCountResource())

urlpatterns = patterns("",
    url(r"^admin/", include(admin.site.urls)),
    #url(r'adminx/', include(xadmin.site.urls)),
    url(r'^harvest/', include("harvest.urls")),
    url(r"^accounts/signup/$", SignupView.as_view(form_class=SignupForm), name="account_signup"),
    url(r"^accounts/settings/$", SettingsView.as_view(form_class=SettingsForm), name="account_settings"),
    url(r"^accounts/login/$", LoginView.as_view(form_class=LoginEmailOrUsernameForm), name="account_login"),

    url(r'', include('social_auth.urls')),
    url(r'misc/', include('misc.urls')),
    url(r"^accounts/", include("account.urls")),
    url(r'^api/', include(v1_api.urls)),
    url(r'^comments/', include('django.contrib.comments.urls')),
    url(r'^profiles/profile/(?P<username>\w+)/', redirect_to, {'url': '/profiles/edit'}),
    url(r'^help/', direct_to_template, {'template': 'help.html'}, name="help"),
    url(r'^about/', direct_to_template, {'template': 'about.html'}, name="about"),
    url(r'^profiles/', include('idios.urls')),
    url(r'^invite/', include('kaleo.urls')),
    url(r'^notifications/', include('notifications.urls', namespace="notifications")),
    url(r'^avatar/', include('avatar.urls')),
    url(r'^snapshot/', include('snapshot.urls')),
Beispiel #9
0
from account.views import (
    ChangePasswordView,
    ConfirmEmailView,
    DeleteView,
    LoginView,
    LogoutView,
    PasswordResetTokenView,
    PasswordResetView,
    SettingsView,
    SignupView,
)

urlpatterns = [
    path("signup/", SignupView.as_view(), name="account_signup"),
    path("login/", LoginView.as_view(), name="account_login"),
    path("logout/", LogoutView.as_view(), name="account_logout"),
    path("confirm_email/<str:key>/",
         ConfirmEmailView.as_view(),
         name="account_confirm_email"),
    path("password/", ChangePasswordView.as_view(), name="account_password"),
    path("password/reset/",
         PasswordResetView.as_view(),
         name="account_password_reset"),
    path("password/reset/<str:uidb36>/<str:token>/",
         PasswordResetTokenView.as_view(),
         name="account_password_reset_token"),
    path("settings/", SettingsView.as_view(), name="account_settings"),
    path("delete/", DeleteView.as_view(), name="account_delete"),
]
Beispiel #10
0
v1_api.register(BookmarkResource())
v1_api.register(ListResource())
v1_api.register(UserResource())
v1_api.register(FeedbackResource())
v1_api.register(FollowResource())
v1_api.register(CommentResource())
v1_api.register(ListInvitationResource())
v1_api.register(UserTourResource())
v1_api.register(FeedCountResource())

urlpatterns = patterns("",
    url(r"^admin/", include(admin.site.urls)),
    #url(r'adminx/', include(xadmin.site.urls)),
    url(r'^harvest/', include("harvest.urls")),
    url(r"^accounts/signup/$", SignupView.as_view(form_class=SignupForm), name="account_signup"),
    url(r"^accounts/settings/$", SettingsView.as_view(form_class=SettingsForm), name="account_settings"),
    url(r"^accounts/login/$", LoginView.as_view(form_class=LoginEmailOrUsernameForm), name="account_login"),

    url(r'', include('social_auth.urls')),
    url(r'misc/', include('misc.urls')),
    url(r"^accounts/", include("account.urls")),
    url(r'^api/', include(v1_api.urls)),
    url(r'^comments/', include('django.contrib.comments.urls')),
    url(r'^profiles/profile/(?P<username>\w+)/', redirect_to, {'url': '/profiles/edit'}),
    url(r'^help/', direct_to_template, {'template': 'help.html'}, name="help"),
    url(r'^about/', direct_to_template, {'template': 'about.html'}, name="about"),
    url(r'^profiles/', include('idios.urls')),
    url(r'^invite/', include('kaleo.urls')),
    url(r'^notifications/', include('notifications.urls', namespace="notifications")),
    url(r'^avatar/', include('avatar.urls')),
    url(r'^snapshot/', include('snapshot.urls')),