Esempio n. 1
0
from registration.backends.model_activation.views import RegistrationView

from sabot.views import ParticipantsView, OwnerSettingCreateView, PermCheckUpdateView, EmailOutputView, XMLListView, MultipleListView, PropertySetterView, PermCheckPropertySetterView, PermCheckSimpleDeleteView, ArchiveCreatorView
from sabot.decorators import user_is_staff

from account.views import TokenLoginView, UserProfileView, ActivateAndSetPWView, GenerateAuthTokenView
from account.forms import RegistrationFormNameAndUniqueEmail
from account.models import UserProfile


urlpatterns = [
	url(r'^token/(?P<token>[0-9a-z]+)$', TokenLoginView.as_view(), name="auth_token"),
	url(r'^profile$', login_required(UserProfileView.as_view()), name="auth_user_profile"),
	url(r'^activatepw/(?P<activation_key>\w+)/$', ActivateAndSetPWView.as_view(), name="auth_activate_pw"),
	url(r'^register/?$', RegistrationView.as_view(
							form_class=RegistrationFormNameAndUniqueEmail),
						name = "auth_register_with_name"),
	# staff pages
	url(r'^list+projects/?$',
		user_is_staff(ListView.as_view(
			model = User,
			template_name = "registration/userAffiliation.html")),
		name = "auth_user_affil"),
	url(r'^list/?$',
		user_is_staff(ListView.as_view(
			model = User,
			template_name = "registration/userList.html")),
		name = "auth_user_list"),
	url(r'^(?P<pk>\d+)/makestaff$',
		user_is_staff(PropertySetterView.as_view(
			model = User,
Esempio n. 2
0
            template_name='registration/activation_complete.html'
        ),
        name='simple_activation_redirect'),
    url(r'^activate/complete/$',
        TemplateView.as_view(
            template_name='registration/activation_complete.html'
        ),
        name='registration_activation_complete'),
    # Activation keys get matched by \w+ instead of the more specific
    # [a-fA-F0-9]{40} because a bad activation key should still get to
    # the view; that way it can return a sensible "invalid key"
    # message instead of a confusing 404.
    url(r'^activate/(?P<activation_key>\w+)/$',
        ActivateWithComplexRedirect.as_view(),
        name='registration_activate'),
    url(r'^register/$',
        RegistrationView.as_view(),
        name='registration_register'),
    url(r'^register/complete/$',
        TemplateView.as_view(
            template_name='registration/registration_complete.html'
        ),
        name='registration_complete'),
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'
        ),
        name='registration_disallowed'),
    url(r'', include('registration.auth_urls')),
]
Esempio n. 3
0
from account.views import TokenLoginView, UserProfileView, ActivateAndSetPWView, GenerateAuthTokenView
from account.forms import RegistrationFormNameAndUniqueEmail
from account.models import UserProfile

urlpatterns = [
    url(r'^token/(?P<token>[0-9a-z]+)$',
        TokenLoginView.as_view(),
        name="auth_token"),
    url(r'^profile/?$',
        login_required(UserProfileView.as_view()),
        name="auth_user_profile"),
    url(r'^activatepw/(?P<activation_key>\w+)/$',
        ActivateAndSetPWView.as_view(),
        name="auth_activate_pw"),
    url(r'^register/?$',
        RegistrationView.as_view(
            form_class=RegistrationFormNameAndUniqueEmail),
        name="auth_register_with_name"),
    # staff pages
    url(r'^list+projects/?$',
        user_is_staff(
            ListView.as_view(
                model=User,
                template_name="registration/userAffiliation.html")),
        name="auth_user_affil"),
    url(r'^list/?$',
        user_is_staff(
            ListView.as_view(model=User,
                             template_name="registration/userList.html")),
        name="auth_user_list"),
    url(r'^(?P<pk>\d+)/makestaff$',
        user_is_staff(
Esempio n. 4
0
urlpatterns = [
    url(r'^$',
        TemplateView.as_view(
            template_name='registration/activation_complete.html'),
        name='simple_activation_redirect'),
    url(r'^activate/complete/$',
        TemplateView.as_view(
            template_name='registration/activation_complete.html'),
        name='registration_activation_complete'),
    # Activation keys get matched by \w+ instead of the more specific
    # [a-fA-F0-9]{40} because a bad activation key should still get to
    # the view; that way it can return a sensible "invalid key"
    # message instead of a confusing 404.
    url(r'^activate/(?P<activation_key>\w+)/$',
        ActivateWithSimpleRedirect.as_view(),
        name='registration_activate'),
    url(r'^register/$',
        RegistrationView.as_view(),
        name='registration_register'),
    url(r'^register/complete/$',
        TemplateView.as_view(
            template_name='registration/registration_complete.html'),
        name='registration_complete'),
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'),
        name='registration_disallowed'),
    url(r'', include('registration.auth_urls')),
]
from django.conf.urls import include, url
from django.contrib import admin

from registration.backends.model_activation.views import RegistrationView
from django.contrib.auth.views import PasswordChangeView, PasswordResetView, PasswordResetConfirmView, PasswordResetCompleteView
from app.forms import RegistrationForm, PasswordChangeForm, PasswordResetForm, SetPasswordForm

admin.autodiscover()

admin.site.site_header = "CFA administration"

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/password/change/$', PasswordChangeView.as_view(form_class=PasswordChangeForm, success_url="done"), name='auth_password_change'),
    url(r'^accounts/password/reset/$', PasswordResetView.as_view(form_class=PasswordResetForm, success_url="done"), name='auth_password_reset'),
    url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',
        PasswordResetConfirmView.as_view(form_class=SetPasswordForm),
        name='password_reset_confirm'),
    url(r'^accounts/password/reset/complete/$', PasswordResetCompleteView.as_view(), name='password_reset_complete'),
    url(r'^accounts/register/$', RegistrationView.as_view(form_class=RegistrationForm), name='registration_register'),
    url(r'^accounts/', include('registration.backends.model_activation.urls')),
    url(r'', include('app.urls')),
]
Esempio n. 6
0
                  url(r'^$', views.main, name='index'),
                  url(r'^articles/', views.articles, name='articles'),
                  url(r'^login/$', views.LoginFormView.as_view(), name='login'),
                  url(r'^login_ok/$', views.LoginOk, name='login_ok'),
                  url(r'^logout/$', views.LogoutView.as_view()),
                  url(r'^edit/$', views.edit, name='edit'),
                  url(r'^profile/$', views.Profile, name='profile'),
                  url(r'^articles_item/(?P<slug>.+)/$', views.articles_detail, name='articles_detail'),
                  url(r'^clients/', views.clients, name='clients'),
                  url(r'^clients_item/(?P<slug>.+)/$', views.clientsphoto_detail, name='clientsphoto_detail'),
                  url(r'^reviews/', views.reviews, name='reviews'),
                  url(r'^reviews_item/(?P<slug>.+)/$', views.reviews_detail, name='reviews_detail'),
                  url(r'^photoshoot/', views.photoshoot, name='photoshoot'),
                  url(r'^personal_data/', views.personaldatarules, name='personaldatarules'),
                  url(r'^personal_data_main/', views.personaldatarules_main, name='personaldatarules_main'),
                  url(r'^summernote/', include('django_summernote.urls')),
                  url(r'^returncall/', views.returncall, name='returncall'),
                  url(r'^rcall_ok/', views.returncallok, name='returncallok'),
                  url(r'^sendreview/', views.sendreview, name='sendreview'),
                  url(r'^sendreview_ok/', views.sendreviewok, name='sendreviewok'),
                  url(r'^pcall_ok/', views.photoshootcallok, name='photoshootcallok'),
                  url(r'^maincall_ok/', views.maincallok, name='maincallok'),
                  url('captcha/', include('captcha.urls')),
                  url(r'^register/$', RegistrationView.as_view(form_class=RegistrationFormUniqueEmail), name='registration_register'),
                  url('', include('registration.urls')),
                  url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps},
                      name='django.contrib.sitemaps.views.sitemap')
              ] \
              + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) \
              + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Esempio n. 7
0
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. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin

from registration.backends.model_activation.views import RegistrationView

from SSIR_auth.forms import CustomUserCreationForm

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', 'SSIR_auth.views.index'),
    url(r'^accounts/register/$',
        RegistrationView.as_view(
            form_class=CustomUserCreationForm
        ),
        name='registration_register',
    ),
    url(r'^accounts/', include('registration.backends.model_activation.urls')),

]
Esempio n. 8
0
File: urls.py Progetto: hrpt-se/hrpt
            template_name='registration/activation_complete.html'
        ),
        name='registration_activation_complete'),
    # Activation keys get matched by \w+ instead of the more specific
    # [a-fA-F0-9]{40} because a bad activation key should still get to the view;
    # that way it can return a sensible "invalid key" message instead of a
    # confusing 404.
    url(r'^activate/(?P<activation_key>\w+)/$',
        TweakedDefaultActivationView.as_view(
            template_name='registration/activate.html'

        ),
        name='registration_activate'),
    url(r'^register/$',
        RegistrationView.as_view(
            template_name='registration/registration_form.html',
            form_class=CaptchaUnicodeRegistrationForm
        ),
        name='registration_register'),
    url(r'^register/complete/$',
        TemplateView.as_view(
            template_name='registration/registration_complete.html'
        ),
        name='registration_complete'),
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'
        ),
        name='registration_disallowed'),
    # From registration.auth_urls
    url(r'^login/$',
        auth_views.login,