Ejemplo n.º 1
0
# -*- coding: utf-8 -*-
from __future__ import unicode_literals

from django.conf.urls import include, url
from django.contrib import admin

from common.views import IndexView
import accounts.urls

urlpatterns = [
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include(accounts.urls)),
    url(r'^api/v1/', include("api.urls", namespace='api')),
    url('^.*$', IndexView.as_view(), name='index'),
]


Ejemplo n.º 2
0
from django.urls import path
from common.views import IndexView, HomeView

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('home/', HomeView.as_view(), name='home')
]
Ejemplo n.º 3
0
from django.views.decorators.cache import never_cache
from ckeditor_uploader import views
from django.views.static import serve

from common.views import IndexView, Logout
from common.views import ContactView
from common.views import AboutUsView
from common.views import NewCommunityProposalView

try:
    admin.autodiscover()
except admin.sites.AlreadyRegistered:
    pass

urlpatterns = [
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^community/', include('blog.urls')),
    url(r'^community/', include('community.urls')),
    url(r'^community/', include('membership.urls')),
    url(r'^meetup/', include('meetup.urls')),
    url(r'^users/', include('users.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^logout/', Logout.as_view(), name='logout'),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^ckeditor/upload/', login_required(views),
        name='ckeditor_upload'),
    url(r'^ckeditor/browse/', never_cache(login_required(views.browse)),
        name='ckeditor_browse'),
    url(r'^contact/$', ContactView.as_view(), name='contact'),
    url(r'^about-us/$', AboutUsView.as_view(), name='about-us'),
    url(r'^propose/newcommunity/$', NewCommunityProposalView.as_view(),
Ejemplo n.º 4
0
from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.conf import settings

from common.views import IndexView

try:
    admin.autodiscover()
except admin.sites.AlreadyRegistered:
    pass

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name="index"),
    url(r'^users/', include('users.urls')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('allauth.urls')),
    url(r'^ckeditor/', include('ckeditor.urls')),
)

if settings.DEBUG:
    urlpatterns += patterns(
        '',
        (r'^static/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.STATIC_ROOT
        }),
        (r'^media/(?P<path>.*)$', 'django.views.static.serve', {
            'document_root': settings.MEDIA_ROOT
        }),
    )
Ejemplo n.º 5
0
from django.conf.urls.defaults import patterns, include, url

from common.views import IndexView, ProfileView

# Uncomment the next two lines to enable the admin:
# from django.contrib import admin
# admin.autodiscover()

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^profile/$', ProfileView.as_view(), name='profile'),
    url(r'', include('banana_py.urls')),
    # Examples:
    # url(r'^$', 'mailchimp_demo.views.home', name='home'),
    # url(r'^mailchimp_demo/', include('mailchimp_demo.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)),
)
Ejemplo n.º 6
0
from django.urls import path

from common.views import (
    IndexView,
    CompanyView,
    PromotionView,
    HumanView,
    InquiryCreateView,
)

app_name = 'common'
urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('company/', CompanyView.as_view(), name='company'),
    path('promotion/', PromotionView.as_view(), name='promotion'),
    path('human/', HumanView.as_view(), name='human'),
    path('inquiry/', InquiryCreateView.as_view(), name='inquiry')
]
Ejemplo n.º 7
0
from django.urls import path, re_path

from common.views import IndexView
from common.api import ItemsView, ItemView

urlpatterns = [
    re_path(r'^api/items', ItemsView.as_view(), name="items_api"),
    re_path(r'^api/item/(?P<id>\d+)/$', ItemView.as_view(), name="item_api"),
    re_path(r'^', IndexView.as_view(), name="index"),
]
Ejemplo n.º 8
0
from django.contrib import admin
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.static import static
from django.contrib.sitemaps.views import sitemap

from common.views import IndexView, VersionView
from common.sitemaps import sitemaps
from common.feeds import BlogFeed

urlpatterns = [
    url(r'^$', IndexView.as_view(), name='index'),
    url(r'^admin/', admin.site.urls),
    url(r'^summernote/', include('django_summernote.urls')),
    url(r'^user/', include('user.urls')),
    url(r'^article/', include('article.urls')),
    url(r'^news/', include('news.urls')),
    url(r'^column/', include('column.urls')),
    url(r'^version/$', VersionView.as_view(), name='version'),
    url(r'^rss/$', BlogFeed(), name='rss'),
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='sitemap')
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if not settings.DEBUG:
    handler400 = 'common.views.bad_request'
    handler403 = 'common.views.permission_denied'
    handler404 = 'common.views.page_not_found'
    handler500 = 'common.views.server_error'
Ejemplo n.º 9
0
"""lluisa_ceramica URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/1.9/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. Import the include() function: from django.conf.urls import url, include
    3. Add a URL to urlpatterns:  url(r'^blog/', include(blog_urls))
"""
from django.conf.urls import url
from django.contrib import admin

from common.views import IndexView

urlpatterns = [
    url(r'^admin/', admin.site.urls),
    url(r'^$', IndexView.as_view()),
]