cookiecutter-django/{{cookiecutter.repo_name}}/{{cookiecutter.project_name}}/config/urls.py

35 lines
1018 B
Python
Raw Normal View History

2013-08-16 18:28:23 +04:00
# -*- coding: utf-8 -*-
from __future__ import unicode_literals
from django.conf import settings
from django.conf.urls import patterns, include, url
2013-08-16 18:28:23 +04:00
from django.conf.urls.static import static
from django.views.generic import TemplateView
# Uncomment the next two lines to enable the admin:
from django.contrib import admin
admin.autodiscover()
urlpatterns = patterns('',
2013-08-16 16:07:28 +04:00
url(r'^$',
TemplateView.as_view(template_name='pages/home.html'),
name="home"),
2013-09-27 00:05:42 +04:00
url(r'^about/$',
2013-08-16 16:07:28 +04:00
TemplateView.as_view(template_name='pages/about.html'),
name="about"),
# Uncomment the next line to enable the admin:
url(r'^admin/', include(admin.site.urls)),
2013-08-16 15:54:47 +04:00
# User management
2013-08-16 15:54:47 +04:00
url(r'^users/', include("users.urls", namespace="users")),
2013-08-16 18:28:23 +04:00
url(r'^accounts/', include('allauth.urls')),
# Uncomment the next line to enable avatars
2013-08-18 17:24:23 +04:00
url(r'^avatar/', include('avatar.urls')),
2013-08-16 20:23:22 +04:00
# Your stuff: custom urls go here
2013-08-16 18:28:23 +04:00
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)