Example #1
0
    url(r'^%s/' % _('contrat-de-location'),
        TemplateView.as_view(template_name='rental_agreement/index.jade'),
        name='agreement'),
    # url(r'^depot-de-garantie/', TemplateView.as_view(template_name='deposit_amount/index.jade'), name='agreement'),
    url(r'^%s/' % _('mentions-legales'),
        TemplateView.as_view(template_name='imprint/index.jade'),
        name='notices'),
    # url(r'^politique_annulation/', TemplateView.as_view(template_name='cancel_terms/index.jade'), name='notices'),
    url(r'^%s/' % _('assurance-tranquillite'),
        TemplateView.as_view(template_name='insurances/index.jade'),
        name='notices'),
    url(r'^%s/' % _('nous-recrutons'),
        TemplateView.as_view(template_name='enroll/index.jade'),
        name='enroll'),
    url(r'^activate/(?P<activation_key>\w+)/$',
        ActivationView.as_view(),
        name='auth_activate'),
    url(r'^sitemap.xml$', index, {'sitemaps': sitemaps}, name="sitemap"),
    url(r'^sitemap-(?P<section>.+).xml$', sitemap, {'sitemaps': sitemaps}),
    url(r'^navette/',
        TemplateView.as_view(template_name='shipping/index.jade'),
        name='shuttle'),
    url(r'^edit/', include(admin.site.urls)),
    url(r'edit/', include('accounts.admin_urls')),
    url(r'^edit/stats/', include('reporting.admin_urls')),
    url(r'^slimpay/', include('payments.slimpay_urls')),
    url(r'^inscription/(?P<campagn_name>\w+)/$',
        SignUpLandingView.as_view(),
        name='signup'),

    # API 2.0
Example #2
0
            name='change_password'
        ),
    )

    if settings.ALLOW_REGISTRATION:
        urlpatterns += patterns('',
                url(r'^accounts/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'^accounts/activate/(?P<activation_key>\w+)/$',
                    ActivationView.as_view(),
                    name='registration_activate'),
                url(r'^accounts/register/$',
                    RegistrationView.as_view(),
                    {'backend': 'accounts.backend.Backend'},
                    name='registration_register'),
                url(r'^accounts/register/complete/$',
                    TemplateView.as_view(template_name='registration/registration_complete.html'),
                    name='registration_complete'),
                url(r'^accounts/register/closed/$',
                    TemplateView.as_view(template_name='registration/registration_closed.html'),
                    name='registration_disallowed'),
                url(r'^accounts/register/after-first-login/$',
                    accounts.views.AfterFirstLoginView.as_view(),
                    name='after_first_login'),
                )
Example #3
0
"""simple_api URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.11/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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from rest_framework_jwt.views import obtain_jwt_token
from accounts.views import ActivationView

urlpatterns = [
    url(r'^api-token-auth/', obtain_jwt_token, name='jwt_auth'),
    url(r'^admin/', admin.site.urls),
    url(r'^api/accounts/', include('accounts.urls', namespace='api_accounts')),
    url(r'^api/posts/', include('posts.urls', namespace='api_posts')),
    url(r'^activate/(?P<token>[\w-]+)/(?P<pk>\d+)/$', ActivationView.as_view(), name='activation_link')
]