urlconf:
from django.conf.urls import url, include, patterns
from django.contrib import admin
from django.views.generic import TemplateView
from django.conf import settings
urlpatterns = [
url(r'^$', TemplateView.as_view(template_name="index.html"), {}, 'index'),
url(r'^accounts/', include('apps.app_accounts.urls')),
url(r'^admin/', admin.site.urls),
]
if settings.DEBUG:
from django.conf.urls.static import static
import debug_toolbar
urlpatterns += patterns('', url(r'^__debug__/', include(debug_toolbar.urls)),)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
url_conf for app (app_accounts)
from django.conf.urls import url
from django.contrib.auth import views as auth_views
from django.core.urlresolvers import reverse_lazy
from . import views
app_name = 'app_accounts'
urlpatterns = [
url(r'account_create/$', views.CreateAccount.as_view(), {}, 'account_create'),
url(r'account_fillup/$', views.FillUpAccount.as_view(), {}, 'account_fillup'),
url(r'account_profile/$', views.ProfileAccount.as_view(), {}, 'account_profile'),
url(r'account_edit/$', views.EditAccount.as_view(), {}, 'account_edit'),
url(r'account_delete/$', views.DeleteAccount.as_view(), {}, 'account_delete'),
url(r'^login/$', auth_views.login,
{
'template_name': 'app_accounts/login.html',
'extra_context': {'title_page': 'Login'},
}, 'login'),
url(r'^logout/$', auth_views.logout,
{
'template_name': 'app_accounts/logout.html',
'extra_context': {'title_page': 'Logout'},
}, 'logout'),
url(r'^password_change/$', auth_views.password_change,
{
'template_name': 'app_accounts/password_change_form.html',
'post_change_redirect': reverse_lazy('app_accounts:password_change_done'),
'extra_context': {'title_page': 'Password change'},
}, 'password_change'),
url(r'^password_change/done/$', auth_views.password_change_done,
{
'template_name': 'app_accounts/password_change_done.html',
'extra_context': {'title_page': 'Password change is done'},
}, 'password_change_done'),
url(r'^password_reset/$', auth_views.password_reset,
{
'template_name': 'app_accounts/password_reset_form.html',
'post_reset_redirect': reverse_lazy('app_accounts:password_reset_done'),
'extra_context': {'title_page': 'Password reset'},
}, 'password_reset'),
url(r'^password_reset/done/$', auth_views.password_reset_done,
{
'template_name': 'app_accounts/password_reset_done.html',
'extra_context': {'title_page': 'Password reset is done'},
}, 'password_reset_done'),
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>[0-9A-Za-z]{1,13}-[0-9A-Za-z]{1,20})/$', auth_views.password_reset_confirm,
{
'template_name': 'app_accounts/password_reset_confirm.html',
'post_reset_redirect': reverse_lazy('app_accounts:password_reset_complete'),
'extra_context': {'title_page': 'Password reset confirm'},
}, 'password_reset_confirm'),
url(r'^reset/done/$', auth_views.password_reset_complete,
{
'template_name': 'app_accounts/password_reset_complete.html',
'extra_context': {'title_page': 'Reset is done'},
}, 'password_reset_complete'),
]
-----------------------------------------------------------------------------------------------
My Trackback on http://dpaste.com/2N00PGB
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/d8bbff14-39ca-42d6-b5bb-e7eca451c0b7%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment