remotes/origin/yandex
Bachurin Sergey 11 years ago
parent 0835c8520a
commit f2381401b4
  1. 11
      project/pages/views.py
  2. 2
      project/urls.py

@ -1,8 +1,13 @@
# -*- coding: utf-8 -*-
from django.shortcuts import render
from django.shortcuts import redirect
from cms.views import details
from cms.models.pagemodel import Page
def site_index(request):
"""Главная страница сайта."""
template_name = 'pages/index.html'
return render(request, template_name)
if request.user.is_anonymous() or request.user.is_superuser:
return details(request, '')
else:
return redirect('customer_profile_view')

@ -21,7 +21,7 @@ urlpatterns = patterns('',
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
url(r'autocomplete/', include('autocomplete_light.urls')),
# url(r'^$', 'project.pages.views.site_index', name='site_index'),
url(r'^$', 'project.pages.views.site_index', name='site_index'),
url(r'^my/', include('project.customer.urls')),
url(r'^my/docs/', include('project.docs.urls')),

Loading…
Cancel
Save