from django.conf.urls import url, patterns
except ImportError:
    from django.conf.urls.defaults import url, patterns

from views import RegistrationView
from views import RegistrationClosedView
from views import RegistrationCompleteView
from views import ActivationView
from views import ActivationCompleteView

urlpatterns = patterns('',
    url(r'^activate/complete/$', ActivationCompleteView.as_view(),
        name='registration_activation_complete'),
    url(r'^activate/(?P<activation_key>\w+)/$', ActivationView.as_view(),
        name='registration_activate'),
    url(r'^register/$', RegistrationView.as_view(),
        name='registration_register'),
    url(r'^register/closed/$', RegistrationClosedView.as_view(),
        name='registration_disallowed'),
    url(r'^register/complete/$', RegistrationCompleteView.as_view(),
        name='registration_complete'),
)
# django.contrib.auth
from django.contrib.auth import views as auth_views
urlpatterns += patterns('',
    url(r'^login/$', auth_views.login, {'template_name': 'registration/login.html'},
        name='auth_login'),
    url(r'^logout/$', auth_views.logout, {'template_name': 'registration/logout.html'},
        name='auth_logout'),
    url(r'^password/change/$', auth_views.password_change,
        name='auth_password_change'),
Пример #2
0
from django.conf.urls import url

from views import ItemCreationView, ItemEditView, ItemDetailView, UserLogView
from views import VariantCreationView, VariantDetailView, VariantEditView, HomePage
from views import RegistrationView, LoginView, LogoutView

urlpatterns = [
    url(r'^$', HomePage.as_view(), name="homepage"),
    url(r'^user-log/$', UserLogView.as_view(), name="log"),
    url(r'^create-item/', ItemCreationView.as_view(), name="create-item"),
    url(r'^edit-item/(?P<pk>\w{0,50})/',
        ItemEditView.as_view(),
        name="edit-item"),
    url(r'^create-variant/',
        VariantCreationView.as_view(),
        name="create-variant"),
    url(r'^view-variant/(?P<pk>\w{0,50})/',
        VariantDetailView.as_view(),
        name="view-variant"),
    url(r'^view-item/(?P<pk>\w{0,50})/',
        ItemDetailView.as_view(),
        name="view-variant"),
    url(r'^edit-variant/(?P<pk>\w{0,50})/',
        VariantEditView.as_view(),
        name="edit-variant"),
    url(r'^register/', RegistrationView.as_view(), name="register-user"),
    url(r'^login/', LoginView.as_view(), name="login"),
    url(r'^logout/', LogoutView.as_view(), name="logout"),
]
Пример #3
0
from django.conf.urls import patterns, include, url

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
from views import SearchView, QueueView, SettingsView, RegistrationView, TorrentPageView, torrent_form_middleman
from api.utils import create_torrent_record, delete_torrent_record, retrieve_queue, register_client,\
    reset_client_id
from authentication.views import LoginView, logout_view
admin.autodiscover()

urlpatterns = patterns('tpb_mobile.views',
    # Examples:
    url(r'^$', SearchView.as_view(), name='home'),
    url(r'^queue/$', QueueView.as_view(), name='queue'),
    url(r'^settings/$', SettingsView.as_view(), name='settings'),
    url(r'^register/$', RegistrationView.as_view(), name='register'),
#     url(r'^torrent/(?P<created>(.)*)/(?P<user>(.)*)/(?P<seeders>(\d)*)/(?P<leechers>(\d)*)/(?P<url>(.)*)/$', TorrentPageView.as_view(), name='torrent'),
    url(r'^torrent/$', TorrentPageView.as_view(), name='torrent'),
    url(r'^middleman/$', torrent_form_middleman, name='middleman'),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns('api.utils',
    url(r'^api/create_torrent/$', create_torrent_record, name='create_torrent'),
    url(r'^api/delete_torrent/$', delete_torrent_record, name='delete_torrent'),
    url(r'^api/retrieve_queue/$', retrieve_queue, name='retrieve_queue'),
    url(r'^api/register_client/$', register_client, name='register_client'),
    url(r'^api/reset_client_id/$', reset_client_id, name='reset_client_id')
)
Пример #4
0
from views import (RegistrationView, ActivationView, LoginForm,
                   PasswordResetView)


urlpatterns = [
    url(r'^login/$', login, {'authentication_form': LoginForm}, name='login'),
    url(r'^activation-complete/$',
        TemplateView.as_view(template_name='registration/activation_complete.html'),  # NOQA
        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+)/$',
        ActivationView.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'),  # NOQA
        name='registration_complete'),
    url(r'^register/closed/$',
        TemplateView.as_view(template_name='registration/registration_closed.html'),  # NOQA
        name='registration_disallowed'),
    url(r'password/reset/$', PasswordResetView.as_view(),
        name='auth_password_reset'),
    url(r'', include('registration.auth_urls')),
]
Пример #5
0
from views import ActivationView, RegistrationView, DeActivationView


urlpatterns = patterns('',
					   url(r'^activate/complete/$',
						   TemplateView.as_view(template_name='accounts/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+)/$',
						   ActivationView.as_view(),
						   name='registration_activate'),
					   url(r'^reactivate/$',
						   ActivationView.as_view(),
						   name='registration_reactivate'),                       
					   url(r'^register/$',
						   RegistrationView.as_view(),
						   name='registration_register'),
					   url(r'^register/complete/$',
						   TemplateView.as_view(template_name='accounts/registration_complete.html'),
						   name='registration_complete'),
					   url(r'^register/closed/$',
						   TemplateView.as_view(template_name='accounts/registration_closed.html'),
						   name='registration_disallowed'),
					   url(r'^cancel/$', 
							DeActivationView.as_view(), name='cancel'),
					   (r'', include('accounts.auth_urls')),
					   )
Пример #6
0
from django.conf.urls import patterns, include, url
from views import RegistrationView, ActivationView

urlpatterns = patterns('',
    url(r'^$', RegistrationView.as_view(), name="signup"),
    url(r'^activation/(?P<phone>[\d]{11,14})/$', ActivationView.as_view(), name="signup_activation"),
)

Пример #7
0
from django.conf.urls import patterns, include, url
from views import IndexView, RegistrationView

# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^board/', include('board.urls', namespace="board")),
    (r'^accounts/login/$', 'django.contrib.auth.views.login'),
    (r'^accounts/logout/$', 'django.contrib.auth.views.logout'),
    url(r'^accounts/registration/$', RegistrationView.as_view(), name='registration'),
    # Examples:
    # url(r'^$', 'he.views.home', name='home'),
    # url(r'^he/', include('he.foo.urls')),

    # Uncomment the admin/doc line below to enable admin documentation:
    # url(r'^admin/doc/', include('django.contrib.admindocs.urls')),

    # Uncomment the next line to enable the admin:
    url(r'^admin/', include(admin.site.urls)),
)


from django.conf import settings

if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += patterns('',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
Пример #8
0
from django.conf.urls import patterns, include, url
from django.views.generic.base import TemplateView

from views import ActivationView
from views import RegistrationView
from forms import EmailUsernameRegistrationForm

urlpatterns = patterns('',
                       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+)/$',
                           ActivationView.as_view(),
                           name='registration_activate'),
                       url(r'^signup/$',
                           RegistrationView.as_view(form_class=EmailUsernameRegistrationForm),
                           name='registration_register'),
                       url(r'^signup/complete/$',
                           TemplateView.as_view(template_name='registration/registration_complete.html'),
                           name='registration_complete'),
                       url(r'^signup/closed/$',
                           TemplateView.as_view(template_name='registration/registration_closed.html'),
                           name='registration_disallowed'),
                       (r'', include('nousernameregistration.auth_urls')),
                       )
Пример #9
0
from django.conf.urls import include, url
from django.views.generic.base import TemplateView
# from registration.backends.simple.views import RegistrationView
from forms import MyRegistrationForm
from views import server, user, animateur, RegistrationView

urlpatterns = [
    url(r'^$', RegistrationView.as_view(form_class=MyRegistrationForm),
        name='registration_register'),
    url(r'^accounts/', include('registration.auth_urls')),
    url(r'^server$', server),
    url(r'^user$', user),
    url(r'^animateur$', animateur),
]
Пример #10
0
from django.conf.urls import url
from django.views.generic.base import TemplateView

from registration.forms import RegistrationFormUniqueEmail

from views import RegistrationView, ActivationView


urlpatterns = patterns('',
    url(r'^activate/complete/$',
       TemplateView.as_view(template_name='registration/activation_complete.html'),  # NOQA
       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+)/$',
       ActivationView.as_view(),
       name='registration_activate'),
    url(r'^register/$',
        RegistrationView.as_view(form_class=RegistrationFormUniqueEmail),
       name='registration_register'),
    url(r'^register/complete/$',
       TemplateView.as_view(template_name='registration/registration_complete.html'),  # NOQA
       name='registration_complete'),
    url(r'^register/closed/$',
       TemplateView.as_view(template_name='registration/registration_closed.html'),  # NOQA
       name='registration_disallowed'),
    (r'', include('registration.auth_urls')),
    )  # NOQA