예제 #1
0
import settings
from django.conf.urls import patterns, include, url
from account.views import LoginView, RegisterView, logout_view, ResetPassword
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()

urlpatterns = patterns('',
    # Examples:
    url(r'auth/', include('social_auth.urls')),
    url(r'^$', LoginView.as_view(), name="login-view"),
    url(r'^register/$', RegisterView.as_view(), name="register-view"),
    url(r'^logout/$', logout_view, {'next_page': '/'}, name="logout-view"),
    #url(r'^signup/$', SignupView.as_view(), name="sign-up"),
    url(r'^lyrics/',include('lyrics.urls')),
    url(r'^reset_password',ResetPassword.as_view(), name="reset_password"),
    
    # url(r'^$', 'LyricsManiac.views.home', name='home'),
    # url(r'^LyricsManiac/', include('LyricsManiac.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)),
)

urlpatterns += patterns('',
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
        'document_root': settings.MEDIA_ROOT}))
예제 #2
0
# coding=utf8

from django.conf.urls import patterns, url
from account.views import Login, Signup, Logout, ConfirmEmail, ResetPassword, ResetPasswordToken, ChangePassword


urlpatterns = patterns(
    "",
    url(r"^login/$", Login.as_view(), name="acct_login"),
    url(r"^signup/$", Signup.as_view(), name="acct_signup"),
    url(r"^logout/$", Logout.as_view(), name="acct_logout"),
    url(r"^confirm_email/(?P<key>\w+)/$", ConfirmEmail.as_view(), name="acct_confirm_email"),
    url(r"^password/change/$", ChangePassword.as_view(), name="acct_password"),
    url(r"^password/reset/$", ResetPassword.as_view(), name="acct_password_reset"),
    url(
        r"^password/reset/(?P<uidb36>[0-9A-Za-z]+)-(?P<token>.+)/$",
        ResetPasswordToken.as_view(),
        name="acct_password_reset_token",
    ),
)