"""hpgcl 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 registration.backends.simple.views import RegistrationView
from leave.forms import MyCustomUserForm

urlpatterns = [
    url(r'', include('leave.urls')),
    url(r'^admin/', admin.site.urls),
    url(
        r'^accounts/register/$',
        RegistrationView.as_view(form_class=MyCustomUserForm),
        name='registration_register',
    ),
    url(r'^accounts/', include('registration.backends.simple.urls')),
]
示例#2
0
文件: urls.py 项目: ngvtuan/darg
    url(r'^company/(?P<company_id>[0-9]+)/download/csv$',
        'project.views.captable_csv', name='captable_csv'),
    url(r'^company/(?P<company_id>[0-9]+)/download/pdf$',
        'project.views.captable_pdf', name='captable_pdf'),
    url(r'^options/$', 'shareholder.views.options', name='options'),
    url(r'^optionsplan/(?P<optionsplan_id>[0-9]+)/$',
        'shareholder.views.optionsplan', name='optionplan'),
    url(r'^optionsplan/(?P<optionsplan_id>[0-9]+)/download/pdf/$',
        'shareholder.views.optionsplan_download_pdf',
        name='optionplan_download_pdf'),
    url(r'^optionsplan/(?P<optionsplan_id>[0-9]+)/download/img/$',
        'shareholder.views.optionsplan_download_img',
        name='optionplan_download_img'),

    # auth
    url(r'^accounts/register/$', RegistrationView.as_view(
        form_class=RegistrationFormUniqueEmail), name='registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^instapage/', 'project.views.instapage', name='instapage'),

    # rest api
    url(r'^services/rest/company/add', AddCompanyView.as_view(),
        name='add_company'),
    url(r'^services/rest/split', AddShareSplit.as_view(), name='split_shares'),
    url(r'^services/rest/optionplan/(?P<optionsplan_id>[0-9]+)/number_segments/'
        r'(?P<shareholder_id>[0-9]+)', AvailableOptionSegmentsView.as_view(),
        name='available_option_segments'),  # before router!
    url(r'^services/rest/', include(router.urls)),
    url(r'^services/rest/invitee', InviteeUpdateView.as_view(),
        name='invitee'),
    url(r'^services/rest/language', LanguageView.as_view(),
        name='language'),
示例#3
0
    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 home.forms import ExRegistrationForm
from registration.backends.simple.views import RegistrationView

urlpatterns = [
    url(r'accounts/register/$',
        RegistrationView.as_view(form_class=ExRegistrationForm),
        name='registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^home/', 'home.views.home', name='home'),
    url(r'^GroupProfile/Overview/',
        'home.views.GroupProfile',
        name='GroupProfile'),
    url(r'^GroupProfile/BeginToTrade/',
        'home.views.BeginToTrade',
        name='BeginToTrade'),
    url(r'^GroupProfile/ShowTransactions/',
        'home.views.ShowTransactions',
        name='ShowTransactions'),
    url(r'^admin/', admin.site.urls),
]
示例#4
0
from django.conf.urls import url, include
from django.contrib import admin
from registration.backends.simple.views import RegistrationView
from django.contrib.auth import views as auth_views
from . import views
from rest_framework.routers import DefaultRouter

router = DefaultRouter()
router.register(r'comments', views.CommentViewSet)
# WARNING! Enabling this might cause unauthorized dweet posting
# router.register(r'dweets', views.DweetViewSet)

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/register/$',
        RegistrationView.as_view(success_url='/'),
        name='register'),
    url(r'^password/change/$',
        auth_views.password_change,
        name='password_change'),
    url(r'^password/change/done/$',
        auth_views.password_change_done,
        name='password_change_done'),
    url(r'^password/reset/$', auth_views.password_reset,
        name='password_reset'),
    url(r'^password/reset/done/$',
        auth_views.password_reset_done,
        name='password_reset_done'),
    url(r'^password/reset/complete/$',
        auth_views.password_reset_complete,
        name='password_reset_complete'),
示例#5
0
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
from django.contrib import admin
from registration.backends.simple.views import RegistrationView
from django.contrib.auth import views as auth_views
from blog_post.views import PostAddView, PostListView, PostDetailView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', PostListView.as_view(), name='front'),
    url(r'^blog/$', PostListView.as_view(), name='blog'),
    url(r'^blog/(?P<pk>[0-9]+)/$',
        PostDetailView.as_view(),
        name='blog-detail'),
    url(r'^register/$', RegistrationView.as_view(), name='register'),
    url(r'^login/$', auth_views.LoginView.as_view(), name='login'),
    url(r'^blog/add/$', PostAddView.as_view(), name='blog-add'),
]
示例#6
0
文件: urls.py 项目: yoyoma207/Rango
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings ##settings allows us to access vars in our projs settings.py file
from registration.backends.simple.views import RegistrationView

class MyRegistration(RegistrationView):
    def get_success_url(self, request, user):
        return '/rango/'

urlpatterns = patterns('',
    # Examples:
    # url(r'^$', 'tango_with_django_project1.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/', include(admin.site.urls)),
    url(r'^rango/', include('rango.urls')),
    url(r'^accounts/register/$', RegistrationView.as_view(), name='registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),

    
)

if settings.DEBUG: ##Checks if the Django project is being run in DEBUG
	urlpatterns += patterns( ##if DEBUG is true, additional URL patterns are appended to the urlpatterns tuple
		'django.views.static',
		(r'^media/(?P<path>.*)', ##any file requested with a URL starting with media/
			'serve',
			{'document_root': settings.MEDIA_ROOT}), )
示例#7
0
from django.conf import settings
from django.contrib import admin
from django.conf.urls import include, url
from django.contrib.auth import views as auth_views
from django.views.generic.base import TemplateView
from .views import homeView, contactView

# Because we overrode the need for the e-mail to be filled out when registering
from .forms import EmailFreeRegistrationForm
from registration.backends.simple.views import RegistrationView

urlpatterns = [
    url(r'^$', homeView, name='home'),
    url(r'^typer/', include('typer.urls'), name='typer'),
    url(r'^admin/', admin.site.urls),
    url(r'^login/$',
        auth_views.login, {'template_name': 'login.html'},
        name='login'),
    url(r'^logout/$',
        auth_views.logout, {'template_name': 'logged_out.html'},
        name='logout'),
    url(r'^accounts/',
        RegistrationView.as_view(form_class=EmailFreeRegistrationForm),
        name='register'),
    url(r'^contact/', contactView, name='contact'),
]
示例#8
0
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
                       # Examples:
                       url(r'^$', views.index, name='home'),

                       url(r'^admin/', include(admin.site.urls)),

                       url(r'^edit/$', views.edit, name="edit"),

                       url(r'^authorize/$', views.authorize, name='authorize'),

                       url(r'^farmers/buy/(?P<pk>\d+)/$',
                           views.buy, name='buy'),

                       url(r'^farmers/(?P<pk>\d+)/$',
                           views.profile, name='profile'),

                       url(r'^register/$', RegistrationView.as_view(
                           form_class=CustomRegistrationForm),
                           name='registration_register'),

                       url(r'^', include(
                           'registration.backends.simple.urls')),
                       )


urlpatterns += staticfiles_urlpatterns()
示例#9
0
    url(r'^cart/', get_cart, name='cart'),
    url(r'^items-counter/', cart_item, name='counter'),
    url(r'^checkout/', checkout, name='checkout'),
    url(r'^wishlist/', wishlist, name='wishlist'),
    url(r'^contact/', contact, name='contact'),
    url(r'^product/', product, name='product'),
    url(r'^product-detail/(?P<product_id>\d+)$',
        product_detail,
        name='product_detail_id'),
    url(r'^product-detail/', product_detail, name='product_detail'),
    url(r'^account/', account, name='account'),
    url(r'^product-detail/(?P<product_id>\d+)$',
        product_detail,
        name='product_detail_id'),
    # url(r'^subscribe/', subscribe, name='subscribe'),
    url(
        r'^register/$',
        RegistrationView.as_view(form_class=CustomRegistrationForm,
                                 template_name='shop_auth_app/register.html'),
        name='registration_register',
    ),
    url(r'^validate_user/$', validate_username, name='validate_user'),
    url(r'^', include(auth_urls, namespace='shop_auth_app')),
    url(r'^', include(reg_urls, namespace='shop_auth_app')),
]

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
    urlpatterns += staticfiles_urlpatterns()
示例#10
0
    # передаёт URL в blogs.url без "blogs/"?

    # Whenever Django encounters include() (django.conf.urls.include()), it chops off whatever part of
    # the URL matched up to that point and sends the remaining string to the included URLconf for further processing.

    # Почему не делаем так?
    # url(r'blogs/', blogs.urls) - нет чопа
    # как внизу - есть

    url(r'^blogs/', include('blogs.urls', namespace="blogs")),
    url(r'^core/', include('core.urls', namespace="core")),
    url(r'^posts/', include('posts.urls', namespace="posts")),
    url(r'^comments/', include('comments.urls', namespace="comments")),
    url(r'^$', HomePageView.as_view(), name="home"),
    # url(r'^accounts/', include('registration.backends.simple.urls'), name="registration"),
    url(r'^accounts/register/$',RegistrationView.as_view(form_class=MyRegistrationForm),name='registration'),
]


#
# urlpatterns = [
#     # ... other URL patterns here
#     url(r'^accounts/register/$',
#         RegistrationView.as_view(
#             form_class=MyCustomUserForm
#         ),
#         name='registration_register',
#     ),
#     url(r'^accounts/', include('registration.backends.hmac.urls')),
# ]
示例#11
0
                    name='password_change'),
    url(r'^accounts/password/change/done/$',
                    auth_views.password_change_done,
                    {'template_name': 'umklapp/password_change_done.html'},
                    name='password_change_done'),

    url(r'^accounts/password/reset/$',
                    auth_views.password_reset,
                    name='password_reset'),
    url(r'^accounts/password/reset/done/$',
                    auth_views.password_reset_done,
                    name='password_reset_done'),
    url(r'^accounts/password/reset/complete/$',
                    auth_views.password_reset_complete,
                    name='password_reset_complete'),
    url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
                    auth_views.password_reset_confirm,
                    name='password_reset_confirm'),

    #url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^accounts/register/$',
                    RegistrationView.as_view(template_name='umklapp/registration_form.html'),
                    name='registration_register'),
    url(r'^accounts/register/closed/$',
                    TemplateView.as_view(template_name='umklapp/registration_closed.html'),
                    name='registration_disallowed'),

    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('umklapp.urls')),
]
This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.

If you'd like to customize registration behavior, feel free to set up
your own URL patterns for these views instead.

"""
from django.conf import settings
from django.conf.urls import include, url
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView
from registration_email.forms import EmailRegistrationForm

urlpatterns = [
    url(r'^register/$',
        RegistrationView.as_view(
            form_class=EmailRegistrationForm,
            get_success_url=getattr(settings,
                                    'REGISTRATION_EMAIL_REGISTER_SUCCESS_URL',
                                    lambda request, user: '******'),
        ),
        name='registration_register'),
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'),
        name='registration_disallowed'),
    (r'', include('registration_email.auth_urls')),
]
示例#13
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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url, patterns
from django.contrib import admin
from django.views.generic.base import RedirectView

from registration.backends.simple.views import RegistrationView


class MyRegistrationView(RegistrationView):
    def get_success_url(self, request=None, user=None):
        return "/rango/"


urlpatterns = patterns(
    "",
    url(r"^admin/", include(admin.site.urls)),
    url(r"^rango/", include("rango.urls")),
    url(r"^$", RedirectView.as_view(url="http://127.0.0.1:8000/rango")),
    url(r"^accounts/register/$", RegistrationView.as_view(), name="registration_register"),
    (r"^accounts/", include("registration.backends.simple.urls")),
)
示例#14
0
文件: urls.py 项目: Sterbic/PUS
    resolve_friend_request, delete_friend, delete_picture, delete_comment,\
    delete_tag, upload_picture, send_friend_request, add_tag, search_users

admin.autodiscover()

urlpatterns = patterns(
    '', url(r'^admin/', include(admin.site.urls)),
    url(r'^$', redirect_home, name='home'),
    url(r'^login/$',
        'django.contrib.auth.views.login',
        {'template_name': 'picshr/login.html'},
        name='login'),
    url(r'^logout/$',
        'django.contrib.auth.views.logout', {'next_page': 'home'},
        name='logout'),
    url(r'^accounts/register/$', RegistrationView.as_view(), name='register'),
    url(r'^users/(?P<username>\w+)/$', user_details_view, name='user_detail'),
    url(r'^pictures/(?P<picture_id>\d+)/$',
        picture_details_view,
        name="picture_detail"),
    url(r'^comment/(?P<picture_id>\d+)/(?P<user_id>\d+)/$',
        submit_comment,
        name='submit_comment'),
    url(r'^like/(?P<picture_id>\d+)/(?P<user_id>\d+)/$',
        like_picture,
        name='like_picture'),
    url(r'^pictures/my/$', UserPictureListView.as_view(), name='my_pictures'),
    url(r'^pictures/friends/$',
        FriendsPictureListView.as_view(),
        name='friends_pictures'),
    url(r'^pictures/public/$',
示例#15
0
"""migr8 URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/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. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from mvc import views as views
from mvc.forms import *
from django.contrib.auth import views as auth_views
from registration.backends.simple.views import RegistrationView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/register/',
        RegistrationView.as_view(form_class=UserCreationCustomForm),
        name='registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^', include('mvc.urls')),
]
示例#16
0
                       # fbUsers in user_app
                       url(r'^fbusers/$', 'user_app.views.fbusers', name='fbusers'),
                       url(r'^fbusers/add_profile/$', 'user_app.views.fbaddprofile', name='fbadd_profile'),
                       url(r'^fbusers/newsfeed/$', 'user_app.views.fbnewsfeed', name='fbnewsfeed'),
                       url(r'^fbusers/home/$', 'user_app.views.fbusers_home', name='fbusers_home'),
                       url(r'^fbusers/profile/$', 'user_app.views.fbuser_profile', name='fbuser_profile'),


                       # Admin
                       url(r'^admin/', include(admin.site.urls)),

                       # Django Auth
                       url(r'^accounts/', include('registration.backends.default.urls')),

                       url(r'^register/charity/$',
                           RegistrationView.as_view(success_url='/charity/new/'),
                           name='registration_register_charity', ),

                       url(r'^register/giver/$',
                           RegistrationView.as_view(success_url='/giver/new/'),
                           name='registration_register_giver', ),

                       url(r'^register/user/$',
                           RegistrationView.as_view(success_url='/user/home/'),
                           name='registration_register_giver', ),

                       url(r'^accounts/password/change/$',
                           auth_views.password_change,
                           name='password_change'),
                       url(r'^accounts/password/change/done/$',
                           auth_views.password_change_done,
示例#17
0
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf import settings
from registration.backends.simple.views import RegistrationView
from main.forms import PetalForm

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/register/',
        RegistrationView.as_view(form_class=PetalForm)),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'', include('main.urls')),
]

urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += staticfiles_urlpatterns()
示例#18
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from registration.backends.simple.views import RegistrationView
from core.views import UserProfileDetailView
from django.contrib.auth.decorators import login_required
from django.contrib.auth import views as auth_views
from core.views import UserProfileEditView
from core.models import UserProfile
from core.forms import UserProfileForm
from core import views

urlpatterns = patterns('',
    url(r'^$','core.views.home', name = 'home' ),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^activities/',include('core.urls', namespace = 'core')),
    url(r'^users/(?P<slug>\w+)/$', UserProfileDetailView.as_view(), name="profile"),
    url(r'^edit_profile/$', login_required(UserProfileEditView.as_view()), name="edit_profile"),
    url(r'^accounts/register/$', RegistrationView.as_view(form_class = UserProfileForm ) , name = 'registration_register'),
    url(r'^accounts/logout/$', auth_views.logout, {'template_name': 'registration/logout.html', 'next_page':'home'}, name='auth_logout'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
)
        
示例#19
0
文件: urls.py 项目: vine-comment/vine
    url(r'^setting_raw/(?P<url_b64>.*?)/?$', SettingRawView.as_view(), name='setting_raw'),
    url(r'^auth_test/$', TemplateView.as_view(template_name='social_signin.html'), name='auth_test'),
    url(r'^comments/hot/(?P<days>.*?)/?$', CommentsHotView.as_view(), name='comments_hot'),
    url(r'^comments/up/(?P<days>.*?)/?$', CommentsUpView.as_view(), name='comments_up'),
    url(r'^comments/debate/(?P<days>.*?)/?$', CommentsDebateView.as_view(), name='comments_debate'),
    url(r'^comments/best/?$', CommentsBestView.as_view(), name='comments_best'),
    url(r'^comments/tag/(?P<flag>.*?)/?$', CommentsTagView.as_view(), name='comments_tag'),
    url(r'^comments/related/(?P<url_b64>.*?)/?$', CommentsRelatedView.as_view(), name='comments_related'),
    url(r'^comments/newest/?$', CommentsNewestView.as_view(), name='comments_newest'),
    url(r'^comments/$', CommentsView.as_view(), name='comments'),
    url(r'^comments/urlpost/$', UrlpostView.as_view(), name='url_post'),
    url(r'^accounts/register/$',
          RegistrationView.as_view(form_class=VineRegistrationForm),
          name='registration_register'),
    url(r'^accounts/register/simple/$',
          RegistrationSimpleView.as_view(form_class=VineRegistrationForm),
          name='registration_register_simple'),
    url(r'^accounts/', include('registration.backends.urls')),
    url(r'^index$', TemplateView.as_view(template_name='index.html'), name='index'),
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}),
    url(r'^author/(?P<name>.*?)/comment/?$', AuthorCommentsView.as_view(), name='author_comment'),
    url(r'document/upload', DocumentUploadView.as_view(), name='document_upload')
)

from haystack.views import SearchView, search_view_factory, FacetedSearchView
from haystack.forms import HighlightedModelSearchForm, FacetedSearchForm
from haystack.query import SearchQuerySet

# patterns 第一个参数是 prefix(对view的),所以这里是 haystack.views.SearchView (?)
urlpatterns += patterns('haystack.views',
    url(r'^advanced_search/', search_view_factory(
示例#20
0
文件: urls.py 项目: eyuwang/wead
#from registration.backends.hmac.views import RegistrationView
#from registration.backends.model_activation.views import RegistrationView
from registration.backends.simple.views import RegistrationView
from registration.forms import RegistrationForm
from editor.forms import UserRegistrationForm
from editor import views 
from django.conf.urls import include, url
from django.contrib import admin

urlpatterns = [
    url(r'^', include('editor.urls')),
    url(r'^editor/', include('editor.urls')),
    url(r'^internal/content/', include('content.urls')),
    url(r'^internal/library/', include('library.urls')),
    url(r'^internal/', include('jhome.urls')),
#    url(r'^accounts/', include('registration.backends.hmac.urls')),
#    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^accounts/profile/$', views.dispatch_ad_source, name='dispatch_ad_source'),
    url(r'^accounts/register/$',
        RegistrationView.as_view(
            form_class = UserRegistrationForm
        ),
        name='registration_register',
    ),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^admin/', admin.site.urls),
]
示例#21
0
# -*- coding: utf8 -*-

from django.conf.urls import include, url
from registration.backends.simple.views import RegistrationView
import registration.auth_urls
import wikipendium.user.views


urlpatterns = [
    url(r'^accounts/register/$',
        RegistrationView.as_view(success_url='/'),
        name='registration_register'),
    url(r'^accounts/', include(registration.auth_urls)),
    url(r'^users/(?P<username>[\w|\W]+)/$',
        wikipendium.user.views.profile, name='user'),
    url(r'^accounts/username/change/$',
        wikipendium.user.views.change_username),
    url(r'^accounts/email/change/$',
        wikipendium.user.views.change_email),
]
示例#22
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, include, url
from registration.backends.simple.views import RegistrationView

from simple_classroom.apps.accounts.views import ProfileView, \
    StudentProfileView, TeacherProfileView
from simple_classroom.apps.classroom.forms import StudentRegistrationForm


urlpatterns = patterns(
    '',
    url(r'^profile/(?:(?P<student_id>\d+)/)?$', ProfileView.as_view(), name='profile'),
    url(r'^teacher/profile/$', TeacherProfileView.as_view(), name='teacher-profile'),
    url(r'^student/profile/(?:(?P<student_id>\d+)/)?$', StudentProfileView.as_view(), name='student-profile'),
    url(
        r'^register/$',
        RegistrationView.as_view(form_class=StudentRegistrationForm),
        name='registration_register'),
    (r'', include('registration.backends.default.urls')),
)
示例#23
0
from django.conf.urls.static import static
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib.auth.views import login
from django.conf import settings
from registration.backends.simple.views import RegistrationView
from petetwitt.forms import CustomRegistrationForm
from petetwitt import views

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

urlpatterns = patterns('',
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/register/$', RegistrationView.as_view(form_class=CustomRegistrationForm)),
    url(r'^accounts/profile/$', views.my_profile, name='my_profile'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^accounts/avatar', views.change_avatar, name='change_avatar'),
    url(r'^signup$', views.signup, name='signup'),
    url(r'^$', views.latest_tweets, name='latest_tweets'),
    url(r'^users/$', views.directory, name='directory'),
    url(r'^users/(?P<username>\w+)/$', views.profile, name='profile'), 
    url(r'^logout/$', 'django.contrib.auth.views.logout', {'template_name' : 'petetwitt/logout.html' }, name='logout'),
    url(r'^post/$', views.post, name='post'),
    url(r'^notifications/$', views.notifications, name='notifications'),
    url(r'^conversation/(?P<pk>\d+)/$', views.conversation, name='conversation'),
    url(r'^tweet/(?P<pk>)\d+/$', views.tweet, name='tweet'),
    url(r'^reply/(?P<tweet_pk>\d+)/$', views.reply, name='reply'),
    url(r'^follow/(?P<username>\w+)/$', views.follow, name='follow'),
    url(r'^unfollow/(?P<username>\w+)/$', views.unfollow, name='unfollow'),
示例#24
0
文件: urls.py 项目: Raouloq/rmap
"""


from django.conf.urls import include
from django.conf.urls import url
from django.conf import settings
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView


urlpatterns = [
    url(
        r"^register/closed/$",
        TemplateView.as_view(template_name="registration/registration_closed.html"),
        name="registration_disallowed",
    ),
    url(
        r"^register/complete/$",
        TemplateView.as_view(template_name="registration/registration_complete.html"),
        name="registration_complete",
    ),
]

if getattr(settings, "INCLUDE_REGISTER_URL", True):
    urlpatterns += [url(r"^register/$", RegistrationView.as_view(), name="registration_register")]

if getattr(settings, "INCLUDE_AUTH_URLS", True):
    urlpatterns += [url(r"", include("registration.auth_urls"))]
示例#25
0
from django.conf import settings
from django.conf.urls import patterns, include, url
from django.conf.urls.static import static
from django.contrib import admin
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView

from opendata.views import Home

admin.autodiscover()


urlpatterns = patterns('',
    url(r'^$', Home.as_view(), name='home'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('registration.auth_urls')),
    url(r'^accounts/register/$', RegistrationView.as_view(),
        name='registration_register'),
    url(r'^accounts/register/closed/$',
        TemplateView.as_view(template_name='registration/registration_closed.html'),
        name='registration_disallowed'),
    url(r'^catalog/', include("catalog.urls")),
    url(r'^comments/', include('django.contrib.comments.urls')),
    url(r'^selectable/', include('selectable.urls')),
    url(r'^scribbler/', include('scribbler.urls')),
    url(r'^request-data/', include('suggestions.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#26
0
from django.contrib import admin
from django.conf import settings

from registration.backends.simple.views import RegistrationView
from .apps.core.registration_forms import RegistrationFormExtra

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^', include('core.urls')),
]

# django-registration

# set a different form
if getattr(settings, 'INCLUDE_REGISTER_URL', True):
    urlpatterns += [
        url(r'^accounts/register/$',
            RegistrationView.as_view(form_class=RegistrationFormExtra),
            name='registration_register',
            ),
    ]

# include rest of registration normally
urlpatterns += [
    url(r'^accounts/', include('registration.backends.simple.urls')),  # use simple to avoid emails in local #TODO 2step
]



admin.site.site_header = 'Django Lotto Administration'
示例#27
0
    url(r'^accounts/password/reset/$',
                    auth_views.password_reset,
                    name='password_reset'),
    url(r'^accounts/password/reset/done/$',
                    auth_views.password_reset_done,
                    name='password_reset_done'),
    url(r'^accounts/password/reset/complete/$',
                    auth_views.password_reset_complete,
                    name='password_reset_complete'),
    url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$',
                    auth_views.password_reset_confirm,
                    name='password_reset_confirm'),

    # url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^accounts/register/$',
                    RegistrationView.as_view(template_name='nbip/registration_form.html'),
                    name='registration_register'),
    url(r'^accounts/register/closed/$',
                    TemplateView.as_view(template_name='nbip/registration_closed.html'),
                    name='registration_disallowed'),

    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('nbip.urls')),
)


if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )
示例#28
0
 url(r"^charities/(?P<charity_id>\w+)/edit/$", "charity_app.views.edit_charity", name="edit_charity"),
 url(r"^charities/(?P<charity_id>\w+)/delete/$", "charity_app.views.delete_charity", name="delete_charity"),
 url(r"^videos/$", "charity_app.views.videos", name="videos"),
 url(r"^videos/new/$", "charity_app.views.new_video", name="new_video"),
 url(r"^videos/(?P<video_id>\w+)/$", "charity_app.views.view_video", name="view_video"),
 url(r"^videos/(?P<video_id>\w+)/edit/$", "charity_app.views.edit_video", name="edit_video"),
 url(r"^videos/(?P<video_id>\w+)/delete/$", "charity_app.views.delete_video", name="delete_video"),
 # url(r'^signup$', 'auth_app.views.signup', name='signup'),
 url(r"^admin/", include(admin.site.urls)),
 url(r"^secret/$", "charity_app.views.special_page", name="secret"),
 # url(r'^accounts/login$', 'auth_app.views.login1', name='login'),
 url(r"^accounts/", include("registration.backends.default.urls")),
 url(r"^$", "charity_app.views.index", name="index"),
 url(
     r"^register/charity/$",
     RegistrationView.as_view(success_url="/charity/new/"),
     name="registration_register_charity",
 ),
 url(r"^register/giver/$", RegistrationView.as_view(success_url="/giver/new/"), name="registration_register_giver"),
 url(r"^register/user/$", RegistrationView.as_view(success_url="/user/home/"), name="registration_register_giver"),
 url(r"^accounts/password/change/$", auth_views.password_change, name="password_change"),
 url(r"^accounts/password/change/done/$", auth_views.password_change_done, name="password_change_done"),
 url(r"^accounts/password/reset/$", auth_views.password_reset, name="password_reset"),
 url(r"^accounts/password/reset/done/$", auth_views.password_reset_done, name="password_reset_done"),
 url(r"^accounts/password/reset/complete/$", auth_views.password_reset_complete, name="password_reset_complete"),
 url(
     r"^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$",
     auth_views.password_reset_confirm,
     name="password_reset_confirm",
 ),
 url(r"", include("registration.backends.default.urls")),
示例#29
0
    url(r'^delete_a/(?P<a_id>[0-9]+)/$',
        'cab.views.delete_answer', name='delete_answer'),
    url(r'^edit_a/(?P<a_id>[0-9]+)/$',
        'cab.views.edit_answer', name='edit_answer'),



    #####################################################


    # Seperate view into another app and check functionality

    url(
        r'^register/$',
        RegistrationView.as_view(form_class=RegistrationFormUniqueEmail),
        name='registration_register',
    ),

    url(r'', include('registration.backends.simple.urls')),


    ######################################################

    # Bookmarking (i.e Favoriting Views)
    url(r'^favs/', 'cab.views.user_bookmarks', name='cab_user_bookmarks'),
    url(r'^add_fav/(?P<question_id>\d+)/$',
        'cab.views.add_bookmark', name='cab_bookmark_add'),
    url(r'^delete_fav/(?P<question_id>\d+)/$',
        'cab.views.delete_bookmark', name='cab_bookmark_delete'),
示例#30
0
    url(r'^fbusers/newsfeed/$', 'user_app.views.fbnewsfeed',
        name='fbnewsfeed'),
    url(r'^fbusers/home/$', 'user_app.views.fbusers_home',
        name='fbusers_home'),
    url(r'^fbusers/profile/$',
        'user_app.views.fbuser_profile',
        name='fbuser_profile'),

    # Admin
    url(r'^admin/', include(admin.site.urls)),

    # Django Auth
    url(r'^accounts/', include('registration.backends.default.urls')),
    url(
        r'^register/charity/$',
        RegistrationView.as_view(success_url='/charity/new/'),
        name='registration_register_charity',
    ),
    url(
        r'^register/giver/$',
        RegistrationView.as_view(success_url='/giver/new/'),
        name='registration_register_giver',
    ),
    url(
        r'^register/user/$',
        RegistrationView.as_view(success_url='/user/home/'),
        name='registration_register_giver',
    ),
    url(r'^accounts/password/change/$',
        auth_views.password_change,
        name='password_change'),
示例#31
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. 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 registration.backends.simple.views import RegistrationView
from shopping.forms import MyCustomUserForm
from django.conf.urls.static import static
from django.conf import settings


urlpatterns = [
	
    url(r'^admin/', admin.site.urls),
    url(r'^accounts/register/$',
        RegistrationView.as_view(
            form_class=MyCustomUserForm
        ),
        name='registration_register',
    ),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'', include('shopping.urls')),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
示例#32
0
    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. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url, patterns, static
from django.contrib import admin
from registration.backends.simple.views import RegistrationView
from workshops.forms import StudentRegistrationForm

from django.conf import settings

urlpatterns = [
    url(r'^workshops/', include('workshops.urls'), name='workshops_home'),
	url(r'^experts/', include('experts.urls'), name='expert_home'),
	url(r'^', include('home.urls')),
    url(r'^admin/', include(admin.site.urls)),
	url(r'accounts/register/$', 
        RegistrationView.as_view(form_class = StudentRegistrationForm), 
        name = 'registration_register'),
	url(r'^accounts/', include('registration.backends.simple.urls')),
	
]

if settings.DEBUG:
    urlpatterns += patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT,
        }),
)
示例#33
0
文件: urls.py 项目: johnfelipe/crike
admin.autodiscover()

#TODO rename all url names and addresses
urlpatterns = patterns('',
# accounts management for administrators
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'favicon/1.ico')),
    url(r'^auth', TemplateView.as_view(template_name='registration/auth.html'), name='auth'),
    url(r'^home/?$', login_required(HomeView.as_view()), name='home'),
    url(r'^lessonschoose$', login_required(LessonsChooseView.as_view()), name='lessonschoose'),
    url(r'^prize/delete(?:/(?P<prize_pk>.*?))?/$', login_required(PrizeDeleteView.as_view()), name='prize_delete'),
    url(r'^prize(?:/(?P<prize_pk>.*?))?/$', login_required(PrizeView.as_view()), name='prize'),
    url(r'^prize_query(?:/(?P<prize_query_pk>.*?))?/$', login_required(PrizeQueryView.as_view()), name='prize_query'),
    url(r'^admin/prize/?$', login_required(PrizeAdminView.as_view()), name='prize_admin'),
    url(r'^accounts/register/$',
          RegistrationView.as_view(form_class=CrikeRegistrationForm),
          name='registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^student$', login_required(StudentView.as_view()), name='student'),
    url(r'^teacher$', login_required(TeacherView.as_view()), name='teacher'),
    url(r'^word/stat$', login_required(WordStatView.as_view()), name='word_stat'),
    url(r'^user/history$', login_required(UserHistoryView.as_view()), name='user_history'),
    url(r'^user/head-sculpture$', login_required(UserHeadSculptureView.as_view()), name='user_head_sculpture'),
    url(r'^admin/students/?$', StudentsAdminView.as_view(), name='students_admin'),

    # This is an interim implement to redirect when registration complete.
    url(r'^users/(?P<username>.*)/?$', RedirectView.as_view(url=reverse_lazy('index'))),

# resource management for teachers
    url(r'^admin/books/', BooksAdminView.as_view(), name='books'),
    url(r'^admin/words/', WordsAdminView.as_view(), name='words'),
示例#34
0
    url(r'^user/(?P<username>[\w.@+-]+)/stickers$',
        views.user.UserStickersView.as_view(),
        name="user_stickers"
    ),

    url(r'^user/(?P<username>[\w.@+-]+)/to-do$',
        views.user.UserToDoView.as_view(),
        name="user_to_do"
    ),



    # Signup
    url(r'^signup$',
        RegistrationView.as_view(
            form_class=auth_forms.RegistrationForm,
            template_name='registration/signup.html',
        ),
        name='registration_register'),

    url(r'^signup/closed$',
        TemplateView.as_view(
            template_name='registration/signup_closed.html'
        ),
        name='registration_disallowed'),


    # Authentication
    url(r'^login$',
        auth_views.login,
        {'template_name': 'registration/login.html',
         'authentication_form': auth_forms.AuthenticationForm},
示例#35
0
v1_api.register(DeveloperResource())
v1_api.register(DeveloperProjectResource())
v1_api.register(CompanyResource())
v1_api.register(CompanyProjectResource())
v1_api.register(BareCompanyProjectResource())

urlpatterns = patterns('',

    url(r'^api/', include(v1_api.urls)),

    # Users
    url(r'^$', 'developer_app.views.angular', name="angular"),

    # Django Auth
    url(r'accounts/', include('registration.backends.default.urls')),
    url(r'^register/user/$', RegistrationView.as_view(success_url='#/user/home/')),
    # url(r'^accounts/password/change/$', auth_views.password_change),
    # url(r'^accounts/password/change/done/$', auth_views.password_change_done),
    # url(r'^accounts/password/reset/$', auth_views.password_reset),
    # url(r'^accounts/password/reset/done/$', auth_views.password_reset_done),
    # url(r'^accounts/password/reset/complete/$', auth_views.password_reset_complete),
    # url(r'^accounts/password/reset/confirm/(?P<uidb64>[0-9A-Za-z]+)-(?P<token>.+)/$', auth_views.password_reset_confirm),
    url(r'^accounts/password/change/$',
        auth_views.password_change,
        name='password_change'),
    url(r'^accounts/password/change/done/$',
        auth_views.password_change_done,
        name='password_change_done'),
    url(r'^accounts/password/reset/$',
        auth_views.password_reset,
        name='password_reset'),
示例#36
0
"""beanbandits URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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, patterns
from django.contrib import admin
from registration.backends.simple.views import RegistrationView
from student.forms import ExtendedForm

urlpatterns = [
    url(r'^', include('teacher.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'accounts/register/$',
        RegistrationView.as_view(form_class = ExtendedForm),
        name = 'registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^student/', include('student.urls')),
]
示例#37
0
from django.conf import settings
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView

urlpatterns = patterns(
    '',
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'),
        name='registration_disallowed'),
    url(r'^register/complete/$',
        TemplateView.as_view(
            template_name='registration/registration_complete.html'),
        name='registration_complete'),
)

if getattr(settings, 'INCLUDE_REGISTER_URL', True):
    urlpatterns += patterns(
        '',
        url(r'^register/$',
            RegistrationView.as_view(),
            name='registration_register'),
    )

if getattr(settings, 'INCLUDE_AUTH_URLS', True):
    urlpatterns += patterns(
        '',
        (r'', include('registration.auth_urls')),
    )
示例#38
0
from django.urls import path
from rango import views
from registration.backends.simple.views import RegistrationView

app_name = 'rango'
urlpatterns = [
    path('', views.index, name='index'),
    path('about/', views.about, name='about'),
    path('category/<slug:category_name_slug>',
         views.show_category,
         name='show_category'),
    path('add_category/', views.add_category, name='add_category'),
    path('category/<slug:category_name_slug>/add_page',
         views.add_page,
         name='add_page'),
    path('search/', views.search, name='search'),
    path('suggest/', views.suggest_category, name='suggest_category'),
    path('goto/', views.track_url, name='goto'),
    path('like/', views.like_category, name='like_category'),
    path('register_profile/', views.register_profile, name='register_profile'),
    path('profile/<username>', views.profile, name='profile'),
    path('register/',
         RegistrationView.as_view(success_url='/rango/register_profile/'),
         name='register'),
    path('profiles/', views.list_profiles, name='list_profiles'),
    path('login/', views.user_login, name='login'),
    path('logout/', views.user_logout, name='logout'),
]
示例#39
0
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.8/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. Add an import:  from blog import urls as blog_urls
    2. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import include, url
from django.contrib import admin
from plank.forms import PlankRegistrationForm
from plank.forms import PlankUserCreationForm
from plank.forms import PlankUserRegistrationForm
# from registration.backends.default.views import RegistrationView
from registration.backends.simple.views import RegistrationView

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^plank/', include('plank.urls')),
    # url(r'^accounts/register/$', RegistrationView.as_view(form_class = PlankRegistrationForm), name = 'registration_register'),
    # url(r'^accounts/register/$', RegistrationView.as_view(form_class = PlankUserCreationForm), name = 'registration_register'),
    url(r'^accounts/register/$', RegistrationView.as_view(form_class = PlankUserRegistrationForm), name = 'registration_register'),
    url(r'^accounts/', include('registration.backends.simple.urls')), # One-step registration
    # url(r'^accounts/', include('registration.backends.default.urls')), #Two-step registratoin
]
示例#40
0
from forms import *

from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # admin
    url(r'^admin/', include(admin.site.urls)),

    # favicon
    url(r'^favicon\.ico$', RedirectView.as_view(url=settings.STATIC_URL + 'favicon/1.ico')),

    # auth & accounts
    url(r'^auth', TemplateView.as_view(template_name='registration/auth.html'), name='auth'),
    url(r'^accounts/register/$',
              RegistrationView.as_view(form_class=LivePortalRegistrationForm),
              name='registration_register'),
    url(r'^accounts/', include('registration.urls')),
    url(r'^resetpassword/passwordsent/$', 'django.contrib.auth.views.password_reset', name='auth_password_reset'),
    url(r'^changepassword/passwordsent/$', 'django.contrib.auth.views.password_change', name='auth_password_change'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', name='auth_logout'),
    url(r'^users/(?P<name>.*?)/?$', HomeView.as_view(), name='user'),

    # follows
    url(r'^user/follows$', login_required(UserFollowsView.as_view()), name='user_follows'),

    # show anchors
    url(r'^show/(?P<tag>.*?)/?$', ShowView.as_view(), name='show'),
    url(r'^/?$', HomeView.as_view(), name='home'),

    # ajax
示例#41
0
文件: urls.py 项目: healy2016/vine
    url(r'^comments/tag/(?P<flag>.*?)/?$',
        CommentsTagView.as_view(),
        name='comments_tag'),
    url(r'^comments/related/(?P<url_b64>.*?)/?$',
        CommentsRelatedView.as_view(),
        name='comments_related'),
    url(r'^comments/newest/?$',
        CommentsNewestView.as_view(),
        name='comments_newest'),
    url(r'^comments/$', CommentsView.as_view(), name='comments'),
    url(r'^comments/urlpost/$', UrlpostView.as_view(), name='url_post'),
    url(r'^accounts/register/$',
        RegistrationView.as_view(form_class=VineRegistrationForm),
        name='registration_register'),
    url(r'^accounts/register/simple/$',
        RegistrationSimpleView.as_view(form_class=VineRegistrationForm),
        name='registration_register_simple'),
    url(r'^accounts/', include('registration.backends.urls')),
    url(r'^index$',
        TemplateView.as_view(template_name='index.html'),
        name='index'),
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT}),
    url(r'^author/(?P<name>.*?)/comment/?$',
        AuthorCommentsView.as_view(),
        name='author_comment'),
    url(r'document/upload',
        DocumentUploadView.as_view(),
        name='document_upload'))

from haystack.views import SearchView, search_view_factory, FacetedSearchView
示例#42
0
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib.auth import views as auth_views
from game.forms import PlayerRegistrationForm
from registration.backends.simple.views import RegistrationView

urlpatterns = [
    url(r'^', include('game.urls')),
    url(r'^login/$',
        auth_views.login, {
            'template_name': 'registration/login.html',
            'redirect_authenticated_user': True,
        },
        name='auth_login'),
    url(r'^logout/$',
        auth_views.logout, {
            'template_name': 'registration/logout.html',
        },
        name='auth_logout'),
    url(r'^register/$',
        RegistrationView.as_view(form_class=PlayerRegistrationForm),
        name='registration_register'),
    url(r'^admin/', admin.site.urls),
]
示例#43
0
文件: urls.py 项目: 112358wise/mailx
for registration::

    (r'^accounts/', include('registration.backends.simple.urls')),

This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.

If you'd like to customize registration behavior, feel free to set up
your own URL patterns for these views instead.

"""


from django.conf.urls import include
from django.conf.urls import patterns
from django.conf.urls import url
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView


urlpatterns = patterns('',
                       url(r'^register/$',
                           RegistrationView.as_view(),
                           name='registration_register'),
                       url(r'^register/closed/$',
                           TemplateView.as_view(template_name='registration/registration_closed.html'),
                           name='registration_disallowed'),
                       (r'', include('registration.auth_urls')),
                       )
示例#44
0
This will also automatically set up the views in
``django.contrib.auth`` at sensible default locations.

If you'd like to customize registration behavior, feel free to set up
your own URL patterns for these views instead.

"""
from django.conf import settings
from django.conf.urls import include, url
from django.views.generic.base import TemplateView

from registration.backends.simple.views import RegistrationView
from registration_email.forms import EmailRegistrationForm


urlpatterns = [
    url(r'^register/$',
        RegistrationView.as_view(
            form_class=EmailRegistrationForm,
            get_success_url=getattr(
                settings, 'REGISTRATION_EMAIL_REGISTER_SUCCESS_URL',
                lambda request, user: '******'),
        ),
        name='registration_register'),
    url(r'^register/closed/$',
        TemplateView.as_view(
            template_name='registration/registration_closed.html'),
        name='registration_disallowed'),
    (r'', include('registration_email.auth_urls')),
]
示例#45
0
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 include, url
from django.contrib import admin
from django.views.generic.base import TemplateView
from registration.backends.simple.views import RegistrationView

from core.forms import CustomUserCreationForm

urlpatterns = [
    url(r'^', include('core.urls')),
    url(r'^polls/', include('polls.urls', namespace='polls')),
    url(r'^admin/', admin.site.urls),
    url(r'^$', TemplateView.as_view(template_name='home.html'), name='home'),
    url(
        r'^register/$',
        RegistrationView.as_view(form_class=CustomUserCreationForm),
        name='registration_register',
    ),
    url(r'^', include('registration.backends.simple.urls')),
]
示例#46
0
文件: urls.py 项目: MikeZaharov/insta
from django.contrib.auth.views import login
from registration.backends.simple.views import RegistrationView
from django.contrib.auth.views import password_reset,password_reset_done,password_reset_confirm,password_reset_complete


login_forbidden =  user_passes_test(lambda u:u.is_anonymous(), '/')


urlpatterns = [
    url(r'^$', 'insta.views.index'),
    url(r'^image/', include('insta.urls')),
    url(r'^admin/', admin.site.urls),
    url(r'^ratings/', include('star_ratings.urls', namespace='ratings', app_name='ratings')),

    url(r'^accounts/login/$',login_forbidden(login),name='registration_login',),
    url(r'^accounts/register/$',login_forbidden(RegistrationView.as_view()),name='registration_register'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'},name='registration_logout'),

    url(r'^accounts/password/reset/$', password_reset,{'template_name': 'registration/password_reset.html'},name='password_reset'),
    url(r'^password/reset/confirm/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$',password_reset_confirm,{'template_name': 'registration/password_reset_confirm_.html'},name='password_reset_confirm'),
    url(r'^password/reset/done/$',password_reset_done,{'template_name': 'registration/password_reset_done_.html'},name='password_reset_done'),
    url(r'^password/reset/complete/$',password_reset_complete,{'template_name': 'registration/password_reset_complete_.html'},name='password_reset_complete'),

    url(r'^account/profile/$', 'insta.views.profile',name='account_profile'),
    url(r'^top/$', 'insta.views.get_top',name='top_users'),

    url(r'^accounts/', include('registration.backends.simple.urls')),

]

Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls import url, include
from django.contrib import admin
from django.contrib import admin
from django.contrib.auth import views
from registration.backends.simple.views import RegistrationView
from neighbourhood.forms import RegisterForm

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'', include('neighbourhood.urls')),
    url(
        r'^accounts/register/$',
        RegistrationView.as_view(form_class=RegisterForm),
        name='registration_register',
    ),
    url(r'^accounts/', include('registration.backends.simple.urls')),
    url(r'^logout/$', views.logout, {"next_page": '/'}),
    url(r'^tinymce/', include('tinymce.urls')),
]
示例#48
0
文件: urls.py 项目: SirEdvin/TestChat
"""
import logging
from threading import Thread
from django.conf.urls import include, url
from django.contrib import admin
from django.views.generic import TemplateView
from registration.backends.simple.views import RegistrationView
import websocket
from TestChat import settings
from util import anonymous_required, authorization_required
from django.contrib.auth import views as auth_views

urlpatterns = [
    url(
        r"^register/",
        anonymous_required(RegistrationView.as_view(success_url="chat")),
        {"success_url": "chat"},
        name="register",
    ),
    url(r"^/", include("registration.backends.default.urls")),
    url(
        r"^login", anonymous_required(auth_views.login), {"template_name": "registration/login.html"}, name="auth_login"
    ),
    url(
        r"^logout$",
        authorization_required(auth_views.logout),
        {"template_name": "registration/logout.html"},
        name="auth_logout",
    ),
    url(r"^admin", include(admin.site.urls)),
    url(r"^", TemplateView.as_view(template_name="chat.html"), name="chat"),