Exemple #1
0
"""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.conf import settings
from django.conf.urls.static import static
from django.contrib import admin

from common.views import HomepageView

urlpatterns = [
    url(r'^$', HomepageView.as_view(), name='homepage'),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('accounts.urls', namespace='accounts')),
    url(r'^income/', include('income.urls', namespace='income')),
    url('', include('social.apps.django_app.urls', namespace='social'))
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

Exemple #2
0
from django.conf.urls.defaults import patterns, include, url
from django.conf import settings
from django.views.generic import TemplateView
from common.views import HomepageView
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    url('', include('cat.urls')),

    url(r'^$', HomepageView.as_view()),

    url(r'^about/$', TemplateView.as_view(template_name="about.html")),

    # 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)),

    url(r'^dashboard/', include('dashboard.urls')),

    url(r'^grappelli/', include('grappelli.urls')),

    url(r'^collection/', include('subcollections.urls')),

    url(r'^accounts/login/$',
        'django.contrib.auth.views.login',
        name='auth_login'),
    url(r'^accounts/logout/$',