Exemplo n.º 1
0
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import include, path
from django.views.generic import TemplateView

urlpatterns = i18n_patterns(path(route="i18n/",
                                 view=include("django.conf.urls.i18n")),
                            path(f"{settings.ADMIN_URL}/", admin.site.urls),
                            path(
                                ".well-known/security.txt",
                                TemplateView.as_view(
                                    template_name="security.txt",
                                    content_type="text/plain",
                                ),
                            ),
                            path(
                                "robots.txt",
                                TemplateView.as_view(
                                    template_name="robots.txt",
                                    content_type="text/plain",
                                ),
                            ),
                            path("api/contact/", include("contact.urls")),
                            path("api/donations/", include("donations.urls")),
                            path("api/users/", include("users.urls")),
                            prefix_default_language=False)

if settings.DEBUG:
    from django.conf.urls.static import static

    urlpatterns += [] + static(settings.MEDIA_URL,
Exemplo n.º 2
0
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from mezzanine.conf import settings
from mezzanine.core.views import direct_to_template


admin.autodiscover()

# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.

urlpatterns = i18n_patterns(
    "",
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    ("^admin/", include(admin.site.urls)),
)

urlpatterns += patterns("", (r"^ckeditor/", include("ckeditor.urls"))) + patterns(
    "",
    # We don't want to presume how your homepage works, so here are a
    # few patterns you can use to set it up.
    # HOMEPAGE AS STATIC TEMPLATE
    # ---------------------------
    # This pattern simply loads the index.html template. It isn't
    # commented out like the others, so it's the default. You only need
    # one homepage pattern, so if you use a different one, comment this
    # one out.
    # url("^$", direct_to_template, {"template": "index.html"}, name="home"),
    # HOMEPAGE AS AN EDITABLE PAGE IN THE PAGE TREE
Exemplo n.º 3
0
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals

from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

admin.autodiscover()

urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^select2/', include('django_select2.urls')),
    url(r'^translations/', include('content_management.urls')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ) + staticfiles_urlpatterns() + urlpatterns  # NOQA
Exemplo n.º 4
0
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import *
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from rest_framework.authtoken import views
from django_cas_ng import views as cas_veiws

admin.autodiscover()

urlpatterns = i18n_patterns('',
                            # url(r'^admin/login', cas_veiws.login),
                            # url(r'^admin/logout', cas_veiws.logout),
                            url(r'^admin/', include(admin.site.urls)),
                            url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
                                {'sitemaps': {'cmspages': CMSSitemap}}),
                            url(r'^select2/', include('django_select2.urls')),
                            url(r'^', include('cms.urls')),
                           )

urlpatterns += patterns('',
                        url(r'^api/', include('api.urls')),

                        # Rest API authentication
                        url(r'^api/api-auth/', include('rest_framework.urls',
                                                       namespace='rest_framework')),

                        # Token Infra
                        url(r'^api/token/', views.obtain_auth_token),
urlpatterns = i18n_patterns(
    url(r"^login/$", auth_views.login, {"template_name": "mtp_auth/login.html"}, name="login"),
    url(
        r"^logout/$",
        auth_views.logout,
        {"template_name": "mtp_auth/login.html", "next_page": reverse_lazy("login")},
        name="logout",
    ),
    url(
        r"^password_change/$",
        auth_views.password_change,
        {"template_name": "mtp_common/auth/password_change.html", "cancel_url": reverse_lazy("bank_admin:dashboard")},
        name="password_change",
    ),
    url(
        r"^password_change_done/$",
        auth_views.password_change_done,
        {
            "template_name": "mtp_common/auth/password_change_done.html",
            "cancel_url": reverse_lazy("bank_admin:dashboard"),
        },
        name="password_change_done",
    ),
    url(
        r"^reset-password/$",
        auth_views.reset_password,
        {"template_name": "mtp_common/auth/reset-password.html", "cancel_url": reverse_lazy("bank_admin:dashboard")},
        name="reset_password",
    ),
    url(
        r"^reset-password-done/$",
        auth_views.reset_password_done,
        {
            "template_name": "mtp_common/auth/reset-password-done.html",
            "cancel_url": reverse_lazy("bank_admin:dashboard"),
        },
        name="reset_password_done",
    ),
    url(r"^", include("bank_admin.urls", namespace="bank_admin")),
    url(r"^", include("feedback.urls")),
    url(r"^404.html$", lambda request: TemplateResponse(request, "mtp_common/errors/404.html", status=404)),
    url(r"^500.html$", lambda request: TemplateResponse(request, "mtp_common/errors/500.html", status=500)),
)
Exemplo n.º 6
0
from django.conf.urls.static import static
from django.contrib import admin

from mezzanine.core.views import direct_to_template
from mezzanine.conf import settings
from ajax_select import urls as ajax_select_urls

admin.autodiscover()

# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.

urlpatterns = i18n_patterns("",
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    ("^admin/", include(admin.site.urls)),
)

if settings.USE_MODELTRANSLATION:
    urlpatterns += patterns('',
        url('^i18n/$', 'django.views.i18n.set_language', name='set_language'),
    )

urlpatterns += i18n_patterns('',
    # We don't want to presume how your homepage works, so here are a
    # few patterns you can use to set it up.

    # HOMEPAGE AS STATIC TEMPLATE
    # ---------------------------
    # This pattern simply loads the index.html template. It isn't
Exemplo n.º 7
0






# coding: utf-8

from django.conf import settings
from django.conf.urls import include, static, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

admin.autodiscover()


urlpatterns = i18n_patterns(
    url(r'^admin/', include(admin.site.urls)),
    url(r'^', include('cms.urls')),
)

if settings.DEBUG:
    urlpatterns += static.static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static.static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

    import debug_toolbar
    urlpatterns = [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ] + urlpatterns
Exemplo n.º 8
0
        i18n.JavaScriptCatalog.as_view(
            packages=['view_tests.app3', 'view_tests.app4'])),
    url(
        r'^jsi18n_admin/$',
        i18n.JavaScriptCatalog.as_view(
            packages=['django.contrib.admin', 'view_tests'])),
    url(r'^jsi18n_template/$', views.jsi18n),
    url(r'^jsi18n_multi_catalogs/$', views.jsi18n_multi_catalogs),
    url(r'^jsoni18n/$', i18n.JSONCatalog.as_view(packages=['view_tests'])),

    # Static views
    url(r'^site_media/(?P<path>.*)$', static.serve,
        {'document_root': media_dir}),
]

urlpatterns += i18n_patterns(
    url(_(r'^translated/$'), views.index_page, name='i18n_prefixed'), )

urlpatterns += [
    url(r'view_exception/(?P<n>[0-9]+)/$',
        views.view_exception,
        name='view_exception'),
    url(r'template_exception/(?P<n>[0-9]+)/$',
        views.template_exception,
        name='template_exception'),
    url(r'^raises_template_does_not_exist/(?P<path>.+)$',
        views.raises_template_does_not_exist,
        name='raises_template_does_not_exist'),
    url(r'^render_no_template/$',
        views.render_no_template,
        name='render_no_template'),
    url(r'^test-setlang/(?P<parameter>[^/]+)/$',
Exemplo n.º 9
0
# Sitemaps
#
sitemaps = {'exercises': ExercisesSitemap, 'nutrition': NutritionSitemap}

#
# The actual URLs
#
urlpatterns = i18n_patterns(
    #url(r'^admin/', admin.site.urls),
    url(r'^', include(('wger.core.urls', 'core'), namespace='core')),
    url(r'workout/',
        include(('wger.manager.urls', 'manager'), namespace='manager')),
    url(r'exercise/',
        include(('wger.exercises.urls', 'exercise'), namespace='exercise')),
    url(r'weight/', include(('wger.weight.urls', 'weight'),
                            namespace='weight')),
    url(r'nutrition/',
        include(('wger.nutrition.urls', 'nutrition'), namespace='nutrition')),
    url(r'software/',
        include(('wger.software.urls', 'software'), namespace='software')),
    url(r'config/', include(('wger.config.urls', 'config'),
                            namespace='config')),
    url(r'gym/', include(('wger.gym.urls', 'gym'), namespace='gym')),
    url(r'email/', include(('wger.mailer.urls', 'email'), namespace='email')),
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': sitemaps}, name='sitemap'))

#
# URLs without language prefix
#
urlpatterns += [
    url(r'^robots\.txt$',
        TextTemplateView.as_view(template_name="robots.txt"),
Exemplo n.º 10
0
"""web_builder_project URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/2.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import path
from django.views.generic import TemplateView


urlpatterns = i18n_patterns(
    path('', TemplateView.as_view(template_name="index.html")),
    path('admin/', admin.site.urls),
)
Exemplo n.º 11
0
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.utils.text import gettext_lazy as _

urlpatterns = i18n_patterns(
    path(_('admin/'), admin.site.urls),
    path(_('korpa/'), include('korpa.urls', namespace='korpa')),
    path(_('narudzbina/'), include('narudzbina.urls', namespace='narudzbina')),
    path(_('placanje/'), include('placanje.urls', namespace='placanje')),
    path(_('kuponi/'), include('kuponi.urls', namespace='kuponi')),
    path('rosetta/', include('rosetta.urls')),
    path('', include('prodavnica.urls', namespace='prodavnica')),
)
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 12
0
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.static import serve

admin.autodiscover()

urlpatterns = [
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': {
        'cmspages': CMSSitemap
    }}),
]

urlpatterns += i18n_patterns(
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^api/', include('filer_video.urls', namespace='api')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', serve, {
            'document_root': settings.MEDIA_ROOT,
            'show_indexes': True
        }),
    ] + staticfiles_urlpatterns() + urlpatterns
Exemplo n.º 13
0
from django.urls import path, include
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns


from main.views import MovieDetailsView, MoviesListView, NewReviewView

urlpatterns = i18n_patterns(
    path('', MoviesListView.as_view(), name='movies-list'),
    path('movie/<int:pk>/', MovieDetailsView.as_view(), name='movie-details'),
    path('movie/<int:movie_pk>/review/', NewReviewView.as_view(), name='new-review'),

    path('admin/', admin.site.urls),
)


Exemplo n.º 14
0
    'static': StaticViewSitemap,
}

# Translateable URLs
urlpatterns = i18n_patterns(
    url(r'^$',
        TemplateView.as_view(template_name='pages/home.html'),
        name="home"),
    url(r'^story/$',
        TemplateView.as_view(template_name='pages/story.html'),
        name="story"),
    url(r'^event/$',
        TemplateView.as_view(template_name='pages/event.html'),
        name="event"),
    url(r'^travel/$',
        TemplateView.as_view(template_name='pages/travel.html'),
        name="travel"),
    url(r'^registry/$',
        TemplateView.as_view(template_name='pages/registry.html'),
        name="registry"),
    url(r'^contact-form/', include('wedsite.contact.urls')),
    url(r'^rsvp/', include('wedsite.rsvp.urls')),
    #sitemaps
    url(r'^sitemap\.xml$',
        sitemap, {'sitemaps': sitemaps},
        name='django.contrib.sitemaps.views.sitemap'),
)

urlpatterns += [
    url(r'^about/$',
        TemplateView.as_view(template_name='pages/about.html'),
Exemplo n.º 15
0
from __future__ import print_function
from cms.sitemaps import CMSSitemap
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings

from ImmOrbit.api import router

admin.autodiscover()

urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^select2/', include('django_select2.urls')),
    url(r'^api/', include(router.urls)),
    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ) + staticfiles_urlpatterns() + urlpatterns  # NOQA
Exemplo n.º 16
0
from django.urls import include, path
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.contrib import admin

admin.autodiscover()

urlpatterns = i18n_patterns(
    path('admin/', admin.site.urls),
    path('', include('cms.urls')),
)

if settings.DEBUG:
    from django.conf.urls.static import static
    from django.contrib.staticfiles.urls import staticfiles_urlpatterns
    urlpatterns += staticfiles_urlpatterns(settings.STATIC_URL)
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 17
0
from __future__ import print_function
from cms.sitemaps import CMSSitemap
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.generic.base import TemplateView
from django.contrib import admin
from django.conf import settings

admin.autodiscover()

urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^robots\.txt', TemplateView.as_view(template_name='robots.txt', content_type='text/plain')),
    url(r'^humans\.txt', TemplateView.as_view(template_name='humans.txt', content_type='text/plain')),
    url(r'^select2/', include('django_select2.urls')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ) + staticfiles_urlpatterns() + urlpatterns  # NOQA
Exemplo n.º 18
0
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.views.generic.base import RedirectView
from django.urls import path, include

urlpatterns = [
    path('', RedirectView.as_view(url='movies/')),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    path('admin/', admin.site.urls),
    path('i18n/', include('django.conf.urls.i18n')),
]

urlpatterns += i18n_patterns(
    path('accounts/', include('allauth.urls')),
    path('pages/', include('django.contrib.flatpages.urls')),
    path('contact/', include("contact.urls")),
    path('movies/', include('movie_catalog.urls')),
)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
    urlpatterns += [path('silk/', include('silk.urls', namespace='silk'))]
Exemplo n.º 19
0
from django.conf.urls import include, url
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns

from django.conf import settings
from django.contrib import admin
from filebrowser.sites import site as filebrowsersite

urlpatterns = [
    # Examples:
    # url(r'^$', 'companydotcom.views.home', name='home'),
    # url(r'^blog/', include('blog.urls')),

    url(r'^admin/filebrowser/', include(filebrowsersite.urls)),
    url(r'^admin/', include(admin.site.urls)),
] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

urlpatterns += i18n_patterns(
    url(r'^', include("website.urls", namespace="website")),
)
Exemplo n.º 20
0
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.urls import path, include

urlpatterns = i18n_patterns(
    path('admin/', admin.site.urls),
    path('cart/', include('cart.urls', namespace='cart')),
    path('orders/', include('orders.urls', namespace='orders')),
    path('payment/', include('payment.urls', namespace='payment')),
    path('coupons/', include('coupons.urls', namespace='coupons')),
    path('rosetta/', include('rosetta.urls')),
    path('', include('shop.urls', namespace='shop')),
)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 21
0
from django.conf.urls import patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings

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

urlpatterns = i18n_patterns('',
    url(r'^$', 'globescope.views.home', name='fakoberkers'),
    url(r'^digita-senscia/', include('digitasenscia.urls')),

    # HIF related (will get moved to own project probably)
    url(r'^hif/', include('HIF.urls')),
    url(r'^question/', 'fakoberkers.views.question', name='question'),

    # Plain sites
    url(r'^dnd/', include('plainsite.urls'), {"site":"dnd"}),

    # 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'^robots.txt$', 'fakoberkers.views.robots', name='robots'),

    url(r'^(?P<partial>.*)$', 'globescope.views.partials', name='partials')
)
Exemplo n.º 22
0
"""questshop URL Configuration

The `urlpatterns` list routes URLs to views. For more information please see:
	https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
	1. Add an import:  from my_app import views
	2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
	1. Add an import:  from other_app.views import Home
	2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
	1. Import the include() function: from django.urls import include, path
	2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.static import static
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns

urlpatterns = i18n_patterns(
    path('admin/', admin.site.urls),
    path('', include('core.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 23
0
from cms.utils import get_cms_setting
from cms.utils.compat.dj import is_installed
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

admin.autodiscover()

urlpatterns = [
    url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
    url(r'^media/cms/(?P<path>.*)$', 'django.views.static.serve', {'document_root': get_cms_setting('MEDIA_ROOT'), 'show_indexes': True}),
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
]

urlpatterns += i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^content/', include('cms.urls')),
)

if settings.DEBUG and is_installed('debug_toolbar'):
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
    ]
Exemplo n.º 24
0
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 patterns, include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

admin.autodiscover()

urlpatterns = i18n_patterns(
    '',
    url(r'^', include('magazine.urls')),
    url(r'^', include('login.urls')),
    url(r'^', include('dashboard.urls')),
    url(r'^', include('forum.urls')),
    url(r'^', include('opinion.urls')),
    url(r'^', include('issue.urls')),
    url(r'^', include('contributor_profile.urls')),
    url(r'^', include('introduction.urls')),
    url(r'^', include('article.urls')),
    url(r'^ckeditor/', include('ckeditor_uploader.urls')),
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += staticfiles_urlpatterns()
Exemplo n.º 25
0
        return HttpResponseServerError('500')

handler404 = 'urls.err404'
handler500 = 'urls.err500'

urlpatterns = i18n_patterns(
    '',
    url(r'^$', IndexView.as_view()),
    url(r'^news/(?P<id>\d+)$',       NewsView.as_view()),

    url(r'^news$',      IndexView.as_view()),
    url(r'^news/$',     IndexView.as_view()),
    url(r'^news/add$',               AddView.as_view()),
    url(r'^news/(?P<id>\d+)/edit$',  EditView.as_view()),
    url(r'^news/(?P<id>\d+)$',       NewsView.as_view()),
    url(r'^news/page(?P<page>\d+)$', IndexView.as_view()),

    url(r'^login$', RegisterView.as_view()),

    url(r'^article/cat/(?P<title>.+)$',          CategoryView.as_view()),
    url(r'^article/(?P<title>.+)/edit$',         ArticleEditView.as_view()),
    #url(r'^article/(?P<title>.+)/review/edits$', ArticleReviewEditsView.as_view()),
    url(r'^article/(?P<title>.+)$',              ArticleView.as_view()),

    url(r'^search$',     SearchView.as_view()),
)

urlpatterns += patterns(
    '',
    url(r'^$',          IndexView.as_view()),
    url(r'^act$',     ActionView.as_view()),
Exemplo n.º 26
0
urlpatterns = i18n_patterns(
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    url("^admin/", include(admin.site.urls)),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url("^inplaceeditform/", include("inplaceeditform.urls")),
    url('^r/(?P<shortkey>[A-z0-9\-_]+)', hs_core_views.short_url),
    url(r'^tracking/reports/profiles/$', tracking.VisitorProfileReport.as_view(),
        name='tracking-report-profiles'),
    url(r'^tracking/reports/history/$', tracking.HistoryReport.as_view(),
        name='tracking-report-history'),
    url(r'^tracking/$', tracking.UseTrackingView.as_view(), name='tracking'),
    url(r'^tracking/applaunch/', tracking.AppLaunch.as_view(), name='tracking-applaunch'),
    url(r'^user/$', theme.UserProfileView.as_view()),
    url(r'^user/(?P<user>.*)/', theme.UserProfileView.as_view()),
    url(r'^comment/$', theme.comment),
    url(r'^rating/$', theme.rating),
    url(r'^profile/$', theme.update_user_profile, name='update_profile'),
    url(r'^update_password/$', theme.update_user_password, name='update_password'),
    url(r'^resend_verification_email/(?P<email>.*)/', theme.resend_verification_email,
        name='resend_verification_email'),
    url(r'^reset_password_request/$', theme.request_password_reset,
        name='reset_password_request'),
    url(r'^new_password_for_reset/(?P<token>[-\w]+)/', theme.UserPasswordResetView.as_view(),
        name='new_password_for_reset'),
    url(r'^confirm_reset_password/$', theme.reset_user_password,
        name='confirm_reset_password'),
    url(r'^deactivate_account/$', theme.deactivate_user, name='deactivate_account'),
    url(r'^delete_irods_account/$', theme.delete_irods_account, name='delete_irods_account'),
    url(r'^create_irods_account/$', theme.create_irods_account, name='create_irods_account'),
    url(r'^accounts/login/$', theme.login, name='login'),
    url(r'^landingPage/$', theme.landingPage, name='landing_page'),
    url(r'^home/$', theme.dashboard, name='dashboard'),
    url(r'^$', theme.home_router, name='home_router'),
    url(r'^email_verify/(?P<new_email>.*)/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify, name='email_verify'),
    url(r'^email_verify_password_reset/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify_password_reset, name='email_verify_password_reset'),
    url(r'^verify/(?P<token>[0-9a-zA-Z:_\-]*)/', hs_core_views.verify),
    url(r'^django_irods/', include('django_irods.urls')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^search/$', DiscoveryView.as_view(), name='haystack_search'),
    url(r'^searchjson/$', DiscoveryJsonView.as_view(), name='haystack_json_search'),
    url(r'^sitemap/$', sitemap, name='sitemap'),
    url(r'^sitemap', include('hs_sitemap.urls')),
    url(r'^collaborate/$', hs_core_views.CollaborateView.as_view(), name='collaborate'),
    url(r'^my-resources/$', hs_core_views.MyResourcesView.as_view(), name='my_resources'),
    url(r'^my-groups/$', hs_core_views.MyGroupsView.as_view(), name='my_groups'),
    url(r'^group/(?P<group_id>[0-9]+)', hs_core_views.GroupView.as_view(), name='group'),
    url(r'^timeseries/sqlite/update/(?P<resource_id>[A-z0-9\-_]+)', hs_ts_views.update_sqlite_file,
        name='update_sqlite_file'),
    url(r'^apps/$', hs_core_views.apps.AppsView.as_view(), name="apps")
)
Exemplo n.º 27
0
from django.conf.urls import url,include
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from django.conf import settings
from django.conf.urls.static import static

urlpatterns = i18n_patterns(
				url(r'^admin/', admin.site.urls),  
				url(r'^', include('custom.urls')), 
				url(r'^', include('languages.urls')), 
				url(r'^', include('music.urls')), 
				url(r'^', include('password_reset.urls')), 
				)
urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT) +\
				               static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 28
0
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.static import serve

admin.autodiscover()

urlpatterns = [
    url(r'^sitemap\.xml$', sitemap, {'sitemaps': {
        'cmspages': CMSSitemap
    }}),
]

urlpatterns += i18n_patterns(
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^classes-and-workshops/',
        include('coursemanager.urls', namespace='courses')),
    url(r'^captcha/', include('captcha.urls')),
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', serve, {
            'document_root': settings.MEDIA_ROOT,
            'show_indexes': True
        }),
    ] + staticfiles_urlpatterns() + urlpatterns
Exemplo n.º 29
0
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

admin.autodiscover()

# Patterns are prefixed with the language code.
# This is not mandatory, can also use a `django_language` cookie,
# or custom middleware that calls `django.utils.translation.activate()`.
urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'', include('article.urls')),
)
Exemplo n.º 30
0
urlpatterns += i18n_patterns(
    url(r"^static/(?P<path>.*)$", serve,
        {"document_root": settings.STATIC_ROOT}),

    # Login URLs
    url(r"^login/$", views.LoginView.as_view(), name="login"),
    # Override the login URL implicitly defined by Django Admin to redirect
    # to our login view.
    url(
        r"^admin/login/$",
        RedirectView.as_view(pattern_name="login",
                             permanent=True,
                             query_string=True)),

    # Generic redirect issue
    url(r"^redirect-issue/$",
        TemplateView.as_view(
            template_name="authentication_service/redirect_issue.html"),
        name="redirect_issue"),
    # Reset password URLs
    url(r"^reset-password/$",
        views.ResetPasswordView.as_view(),
        name="reset_password"),
    url(r"^reset-password/security-questions/$",
        views.ResetPasswordSecurityQuestionsView.as_view(),
        name="reset_password_security_questions"),
    url(r"^reset-password/done/$",
        PasswordResetDoneView.as_view(),
        name="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})/$",
        views.PasswordResetConfirmView.as_view(),
        name="password_reset_confirm"),
    url(r"^reset/complete/$",
        PasswordResetCompleteView.as_view(),
        name="password_reset_complete"),
    url(r"^admin/", admin.site.urls),
    url(r'^admin/defender/', include('defender.urls')),  # defender admin
    # Override the login URL implicitly defined by Two Factor Auth to redirect
    # to our login view (which is derived from theirs).
    url(
        r"^two-factor-auth/account/login/",
        RedirectView.as_view(pattern_name="login",
                             permanent=True,
                             query_string=True)),
    url(r"^two-factor-auth/",
        include(two_factor_patterns, namespace="two_factor_auth")),
    # Registration URLs
    url(r"^registration/(?P<step>.+)/$",
        registration_wizard,
        name="registration_step"),
    url(r"^registration/$", registration_wizard, name="registration"),
    url(r"^redirect/$",
        views.SessionRedirectView.as_view(),
        name="redirect_view"),
    # Profile Edit URLs
    url(r"^profile/edit/",
        login_required(views.EditProfileView.as_view()),
        name="edit_profile"),
    url(r"^profile/password/",
        login_required(views.UpdatePasswordView.as_view()),
        name="update_password"),
    url(r"^profile/security/",
        login_required(views.UpdateSecurityQuestionsView.as_view()),
        name="update_security_questions"),
    url(r"^profile/2fa/",
        login_required(ProfileView.as_view()),
        name="update_2fa"),
    url(r"^profile/delete-account/",
        login_required(views.DeleteAccountView.as_view()),
        name="delete_account"),
    url(r"^lockout/$", views.LockoutView.as_view(), name="lockout_view"),

    # Include the migration app
    url(
        r"^user-migration/",
        include("authentication_service.user_migration.urls",
                namespace="user_migration")),

    # Include the request client app
    url(
        r"^request-client/",
        include("authentication_service.request_client.urls",
                namespace="request_client")))
Exemplo n.º 31
0
from django.conf import settings
from django.conf.urls import include, url, patterns
from django.conf.urls.i18n import i18n_patterns
from django.views.generic.base import RedirectView
from django.contrib import admin
admin.autodiscover()

from softwarecollections import fas, scls

urlpatterns = i18n_patterns('',
    url(r'^admin/',     include(admin.site.urls)),
    url(r'^faq/$',      RedirectView.as_view(url='/en/docs/faq/')),
    url(r'^scls/',      include(scls.urls)),
    url('',             include(fas.urls)),
    url(r'^((?P<path>.*)/|)$', 'softwarecollections.pages.views.page', name='page',
                        kwargs={'template_dir':'pages'}),
)

if settings.DEBUG:
    urlpatterns = patterns('',
    url(r'^repos/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.REPOS_ROOT, 'show_indexes': True}),
) + urlpatterns
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.2/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.i18n import i18n_patterns

from django.conf.urls.static import static
from django.conf import settings

urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),
]

urlpatterns += i18n_patterns(path('admin/', admin.site.urls),
                             path('app/', include('app.urls')))

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 33
0
from cms.utils.conf import get_cms_setting
from django.conf import settings
from django.conf.urls.defaults import handler500, handler404, patterns, include, \
    url
try:
    from django.conf.urls.i18n import i18n_patterns
except ImportError:
    from i18nurls.i18n import i18n_patterns
from django.contrib import admin

admin.autodiscover()

urlpatterns = patterns('',
    url(r'^admin/', include(admin.site.urls)),
    url(r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'),
    url(r'^media/cms/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': get_cms_setting('MEDIA_ROOT'), 'show_indexes': True}),
    url(r'^media/(?P<path>.*)$', 'django.views.static.serve',
        {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),

)

urlpatterns += i18n_patterns('',
    url(r'^', include('cms.test_utils.project.cms_urls_for_apphook_tests')),
)
Exemplo n.º 34
0
]
urls += [
    url(
        r'^api/(?P<article>[-\w]*\/?)$',
        MarkdownDirectoryView.as_view(template_name='zerver/api/main.html',
                                      path_template='/zerver/api/%s.md'))
]

if settings.DEVELOPMENT:
    urls += dev_urls.urls
    i18n_urls += dev_urls.i18n_urls

# The sequence is important; if i18n urls don't come first then
# reverse url mapping points to i18n urls which causes the frontend
# tests to fail
urlpatterns = i18n_patterns(*i18n_urls) + urls + legacy_urls


def handler400(request: HttpRequest, exception: Exception) -> HttpResponse:
    #
    # This behaves exactly like the default Django implementation in
    # the case where you haven't made a template "400.html", which we
    # haven't -- except that it doesn't call `@requires_csrf_token` to
    # attempt to set a `csrf_token` variable that the template could
    # use if there were a template.  We skip @requires_csrf_token
    # because that codepath can raise an error on a bad request, which
    # is exactly the case we're trying to handle when we get here.
    # Bug filed upstream: https://code.djangoproject.com/ticket/28693
    #
    # This function is used just because it has this special name in
    # the root urls.py file; for more details, see:
Exemplo n.º 35
0
urlpatterns = i18n_patterns('',
    #url(r'^$', RedirectView.as_view(url='/lv/sacensibas/42/rezultati/'), name='index'),
    url(r'^$', IndexView.as_view(), name='index'),

    url(_(r'^application/$'), ApplicationCreate.as_view(), name='application'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$'), ApplicationUpdate.as_view(), name='application'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/pay/$'), ApplicationPayView.as_view(), name='application_pay'),
    url(_(r'^application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/ok/$'), ApplicationOKView.as_view(), name='application_ok'),



    url(_(r'^company_application/$'), MyCompanyApplicationList.as_view(), name='companyapplication_list'),
    url(_(r'^company_application/add/$'), CompanyApplicationCreate.as_view(), name='companyapplication'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/$'), CompanyApplicationDetail.as_view(), name='companyapplication'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/add/$'), CompanyApplicationParticipantAdd.as_view(), name='companyapplication_add'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/ok/$'), CompanyApplicationParticipantAddOK.as_view(), name='companyapplication_ok'),
    url(_(r'^company_application/(?P<slug>[0-9a-f]{8}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{4}-[0-9a-f]{12})/edit/$'), CompanyApplicationUpdate.as_view(), name='companyapplication_edit'),


    url(_(r'^results/'), ResultAllView.as_view(), name="all_results"),
    url(_(r'^payment/'), include('payment.urls', namespace='payment')),
    url(_(r'^whatever/'), include('advert.urls', namespace='advert')),
    url(_(r'^news/'), include('news.urls', namespace='news')),
    url(_(r'^gallery/'), include('gallery.urls', namespace='gallery')),
    url(_(r'^mk/'), include('marketing.urls', namespace='marketing')),
    url(r'^manager/', include('manager.urls', namespace='manager')),
    url(_(r'^competition/'), include('velo.urls_competition', namespace='competition')),
    url(_(r'^supporters/'), AgencySupporters.as_view(), name="agency_supporters"),
    url(_(r'^calendar/'), CalendarView.as_view(), name="calendar"),
    url(_(r'^accounts/'), include('core.urls', namespace='accounts')),
    url(_(r'^accounts/'), include('social.apps.django_app.urls', namespace='social')),
    url(r'^jsi18n/$', 'velo.views.cached_javascript_catalog', js_info_dict),
)
Exemplo n.º 36
0
from mezzanine.core.views import direct_to_template
from mezzanine.conf import settings

# Uncomment to use blog as home page. See also urlpatterns section below.
# from mezzanine.blog import views as blog_views
from status import views
from sign import views as signviews  # 防止视图函数重复
from app1.views import myview
admin.autodiscover()

# Add the urlpatterns for any custom Django applications here.
# You can also change the ``home`` view to add your own functionality
# to the project's homepage.

urlpatterns = i18n_patterns(
    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    url("^admin/", include(admin.site.urls)), )

if settings.USE_MODELTRANSLATION:
    urlpatterns += [
        url('^i18n/$', set_language, name='set_language'),
    ]

urlpatterns += {
    # We don't want to presume how your homepage works, so here are a
    # few patterns you can use to set it up.

    # HOMEPAGE AS STATIC TEMPLATE
    # ---------------------------
    # This pattern simply loads the index.html template. It isn't
    # commented out like the others, so it's the default. You only need
Exemplo n.º 37
0
"""unlod 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 import settings
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.views.generic import RedirectView

urlpatterns = [
    url(r'^$', include('thesaurus.urls')),
    url(r'^admin/', include(admin.site.urls)),
] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)

urlpatterns += i18n_patterns(
    url(r'^thesaurus/', include('thesaurus.urls', namespace='thesaurus')),
)
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.urls import include, path

admin.autodiscover()

urlpatterns = [
    path("sitemap.xml", sitemap, {"sitemaps": {"cmspages": CMSSitemap}}),
    path('api/', include('todos.urls')),
]


urlpatterns += i18n_patterns(path("admin/", admin.site.urls), path("", include("cms.urls")))

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
Exemplo n.º 39
0
    ),

    # i18n
    url(r'^jsi18n/$', 'django.views.i18n.javascript_catalog', kwargs=js_info_dict, name='javascript-catalog'),
    url(r'^rosetta/', include('rosetta.urls')),
    url(r'^i18n/(?P<language>.+)/$', 'portal.views.setlang', name='setlang'),
    url(r'^faq$', 'portal.views.faq', name='faq'),

    # Admin interface
    url(r'^admin/', include(admin.site.urls)),

    # Sitemaps
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
)

urlpatterns += i18n_patterns(
    '',

    # Location API
    url(r'^api/location/(?P<location_ids>[0-9,]*)/$', 'portal.views.location_api'),
    url(r'^api/location/$', 'portal.views.location_api'),
    url(r'^api/location/json/$', 'portal.views.location_json_api'),
    url(r'^api/starred-location/(?P<location_ids>[0-9,]*)/$', 'portal.views.starred_location_api'),

    # Neighborhood API
    url(r'^api/neighborhood/$', 'portal.views.neighborhood_api'),
)

if settings.DEBUG:
    urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_URL)
Exemplo n.º 40
0
from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.sitemaps.views import sitemap
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.views.static import serve

admin.autodiscover()

urlpatterns = [
    url(r'^sitemap\.xml$', sitemap,
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^kingadmin/', include('kingadmin.urls')),
]

urlpatterns += i18n_patterns(
    # url(r'^admin/', admin.site.urls),  # NOQA
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^', include('cms.urls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', serve,
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ] + staticfiles_urlpatterns() + urlpatterns
Exemplo n.º 41
0
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin

# urlpatterns = patterns('',
#    # Examples:
#    # url(r'^$', 'djangoapps.views.home', name='home'),
#    # url(r'^blog/', include('blog.urls')),
#    url(r'^admin/', include(admin.site.urls)),
#    url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework'))
# )

urlpatterns = i18n_patterns(
    "",
    url(r"^admin/", include(admin.site.urls)),
    url(r"^filer/", include("filer.urls")),
    url(r"^taggit_autosuggest/", include("taggit_autosuggest.urls")),
    url(r"^", include("cms.urls")),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
The `urlpatterns` list routes URLs to views. For more information please see:
    https://docs.djangoproject.com/en/3.1/topics/http/urls/
Examples:
Function views
    1. Add an import:  from my_app import views
    2. Add a URL to urlpatterns:  path('', views.home, name='home')
Class-based views
    1. Add an import:  from other_app.views import Home
    2. Add a URL to urlpatterns:  path('', Home.as_view(), name='home')
Including another URLconf
    1. Import the include() function: from django.urls import include, path
    2. Add a URL to urlpatterns:  path('blog/', include('blog.urls'))
"""
from django.contrib import admin
from django.urls import path, include
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.conf import settings

# Case 1:
urlpatterns = [
    path('admin/', admin.site.urls),
]
urlpatterns += i18n_patterns(
    path('i18n/', include('django.conf.urls.i18n')),
    path('translate/', include('translate.urls')),
    # prefix_default_language=False,
)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 43
0
"""
This ``urls.py`` is only used when running the tests via ``runtests.py``.
As you know, every app must be hooked into yout main ``urls.py`` so that
you can actually reach the app's views (provided it has any views, of course).

"""
from django.conf import settings
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.conf.urls.static import static


admin.autodiscover()

urlpatterns = static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
urlpatterns += staticfiles_urlpatterns()
urlpatterns += i18n_patterns(
    url(r'^admin/', include(admin.site.urls)),
    url(r'^news/', include('multilingual_news.urls')),
    url(r'^', include('cms.urls')),
)
Exemplo n.º 44
0
    url(r'^edit/projects/add/$', edit.create, name='project_add'),
    url(r'^edit/projects/(?P<pk>[\d]+)/$', edit.update, name='project_edit'),
    url(r'^edit/projects/(?P<pk>[\d]+)/media/$',
        edit.media_index,
        name='project_edit_media'),
    url(r'^edit/projects/(?P<pk>[\d]+)/media/add/$',
        edit.create_media,
        name='project_edit_create_media'),
    url(r'^edit/projects/(?P<pk>[\d]+)/media/(?P<media_pk>[\d]+)/$',
        edit.update_media,
        name='project_edit_update_media'),
    url(r'^edit/projects/(?P<pk>[\d]+)/media/(?P<media_pk>[\d]+)/delete/$',
        edit.delete_media,
        name='project_edit_delete_media'),
]

urlpatterns += i18n_patterns(url(r'^$', public.home, name='home'),
                             url(r'^about/$', about, name='about'),
                             url(r'^contact/$', contact, name='contact'),
                             url(r'^categories/(?P<slugs>[\/\-a-zA-Z]+)/$',
                                 public.project_index,
                                 name='project_index'),
                             url(r'^projects/(?P<slug>[\w.:@+-]+)/$',
                                 public.project_detail,
                                 name='project_detail'),
                             prefix_default_language=False)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 45
0
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin

from pages.conf import settings as pages_settings
from pages.views import PageDetailsView

admin.autodiscover()

urlpatterns = [
    url(r'^$', PageDetailsView.as_view(), kwargs={pages_settings.PAGES_PAGE_SLUG_NAME: 'home', }),
    url(r'^i18n/', include('django.conf.urls.i18n')),
    url(r'^admin/', include(admin.site.urls)),
    url(r'^markitup/', include('markitup.urls'))
]

urlpatterns += i18n_patterns(url(r'^page/', include('pages.urls', namespace='pages')), )

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 46
0
from django.apps import apps
from django.urls import include, path
from django.contrib import admin
from django.conf import settings
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static

urlpatterns = [
    path('i18n/', include('django.conf.urls.i18n')),
    path('admin-view/', admin.site.urls),
    path('catalogue/', include(apps.get_app_config('oscar').urls[0])),
    path('', include('content.urls')),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    path('novaposhta/', include('novaposhta.urls')),
    path('api/', include('oscarapi.urls')),
    path('dashboard/accounts/',
         apps.get_app_config('accounts_dashboard').urls),
]

urlpatterns += i18n_patterns(path('', include('content.urls')), )

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 47
0
# -*- coding: utf-8 -*-
from __future__ import absolute_import, print_function, unicode_literals

from cms.sitemaps import CMSSitemap
from django.conf import settings
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns

admin.autodiscover()

urlpatterns = i18n_patterns('',
    url(r'^admin/', include(admin.site.urls)),  # NOQA
    url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
        {'sitemaps': {'cmspages': CMSSitemap}}),
    url(r'^select2/', include('django_select2.urls')),
    url(r'^', include('cms.urls')),
    url(r'^polls/', include('polls.urls', namespace='polls')),
)

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
        url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
        ) + staticfiles_urlpatterns() + urlpatterns  # NOQA
Exemplo n.º 48
0
from django.conf import settings
from django.conf.urls import url, include
from django.conf.urls.i18n import i18n_patterns
from django.conf.urls.static import static
from django.contrib import admin
from django.views import defaults as default_views

urlpatterns = [
    url(settings.ADMIN_URL, include(admin.site.urls)),
    url(r'', include('apps.customer.urls')),
]

urlpatterns += i18n_patterns(
    url(settings.ADMIN_URL, include(admin.site.urls)),
    url(r'', include('apps.dashboard.urls')),
)

urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
if settings.DEBUG:
    import debug_toolbar

    urlpatterns += [
        url(r'^400/$',
            default_views.bad_request,
            kwargs={'exception': Exception("Bad Request!")}),
        url(r'^403/$',
            default_views.permission_denied,
            kwargs={'exception': Exception("Permission Denied")}),
        url(r'^404/$',
            default_views.page_not_found,
Exemplo n.º 49
0
# -*- coding: utf-8 -*-
from django.conf.urls import include, url
from django.contrib import admin
from django.conf.urls.i18n import i18n_patterns
from .views import home, home_files

urlpatterns = [
    url(r'^(?P<filename>(robots.txt)|(humans.txt))$',
        home_files, name='home-files'),
    url(r'^accounts/logout/$', 'django.contrib.auth.views.logout', {'next_page': '/'}),
    url(r'^accounts/', include('allauth.urls')),
]

urlpatterns += i18n_patterns(
    url(r'^$', home, name='home'),
    url(r'^admin/', include(admin.site.urls)),
)
Exemplo n.º 50
0
                              namespace='contact')),
    url(r'^blog/', include(('blog.urls', 'blog'), namespace='blog')),
    url(r'', include(('core1.urls', 'core1'), namespace='core')),
    url(r'^cart/', include((cart_urls, 'cart'), namespace='cart')),
    url(r'^checkout/',
        include((checkout_urls, 'checkout'), namespace='checkout')),
    url(r'^jsi18n/$', JavaScriptCatalog.as_view(), name='javascript-catalog'),
    url(r'^order/', include((order_urls, 'order'), namespace='order')),
    url(r'^page/', include((page_urls, 'page'), namespace='page')),
    url(r'^products/', include((product_urls, 'product'),
                               namespace='product')),
    url(r'^account/', include((account_urls, 'account'), namespace='account')),
    url(r'^feeds/', include((feed_urls, 'data_feeds'),
                            namespace='data_feeds')),
    url(r'^search/', include((search_urls, 'search'), namespace='search'))
]

urlpatterns = non_translatable_urlpatterns + i18n_patterns(
    *translatable_urlpatterns)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += [
        url(r'^__debug__/', include(debug_toolbar.urls)),
        # static files (images, css, javascript, etc.)
        url(r'^static/(?P<path>.*)$', serve)
    ] + static('/media/', document_root=settings.MEDIA_ROOT)

if settings.ENABLE_SILK:
    urlpatterns += [url(r'^silk/', include('silk.urls', namespace='silk'))]
Exemplo n.º 51
0
         name='editable3'),
    path('selectable/', SelectableListingIndexView.as_view(),
         name='selectable'),
    path('selectable/1/', SelectableListing1View.as_view(),
         name='selectable1'),
    path('selectable/2/', SelectableListing2View.as_view(),
         name='selectable2'),
    path('selectable/3/', SelectableListing3View.as_view(),
         name='selectable3'),
    path('selectable/4/', SelectableListing4View.as_view(),
         name='selectable4'),
    path('selectable/5/', SelectableListing5View.as_view(),
         name='selectable5'),
    path('insertable/', InsertableListingView.as_view(),
         name='insertable'),
    path('fonticons/', FonticonsView.as_view(),
         name='fonticons'),
    # from django-robohash-svg django app
    path('robohash/<string>/', robohash,
         name='robohash')
]

urlpatterns += i18n_patterns(
    path(r'translation/', TranslationListingView.as_view(),
        name='translation'),
)


if settings.DEBUG:
    # static files (images, css, javascript, etc.)
    urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
Exemplo n.º 52
0
    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. Import the include() function: from django.conf.urls import url, include
    2. Add a URL to urlpatterns:  url(r'^blog/', include('blog.urls'))
"""
from django.conf.urls import include, url
from django.contrib import admin
from django.conf import settings
from django.conf.urls.static import static
from django.conf.urls.i18n import i18n_patterns
from django.utils.translation import gettext_lazy as _

urlpatterns = i18n_patterns(
    url(r'^admin/', include(admin.site.urls)),
    url(r'^accounts/', include('accounts.urls')),
    url(r'^accounts/', include('django.contrib.auth.urls')),
    url(_(r'^cart/'), include('cart.urls', namespace='cart')),
    url(_(r'^orders/'), include('orders.urls', namespace='orders')),
    url(_(r'^payment/'), include('payment.urls', namespace='payment')),
    url(r'^paypal/', include('paypal.standard.ipn.urls')),
    url(_(r'^coupons/'), include('coupons.urls', namespace='coupons')),
    url(r'^', include('shop.urls', namespace='shop')),
)

if settings.DEBUG:
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)
Exemplo n.º 53
0
urlpatterns += i18n_patterns('',

    (r'^grappelli/', include('grappelli.urls')),
    
    # Django administration
    (r'^admin/', include(admin.site.urls)),

    # Index
    url(r'^$', 'core.views.index_view', name='site-index'),

    # User accounts
    url(_(r'^accounts/'), include('apps.thirdparty.userprofile.urls')),

    # Spaces
    url(_(r'^spaces/'), include('core.spaces.urls')),
    
    # Invitations
    url(_(r'^invite/'), 'core.views.invite', name='invite'),
    
    # News (this view of news is only for the index)
    url(_(r'^news/$'), ListNews.as_view(), name='list-site-news'),
    
    url(_(r'^news/add/$'), AddPost.as_view(), name='add-site-post'),

    url(_(r'^news/(?P<post_id>\w+)/delete/$'), DeletePost.as_view(),
                                            name='delete-site-post'),

    url(_(r'^news/(?P<post_id>\w+)/edit/$'), EditPost.as_view(),
                                          name='edit-site-post'),

    url(_(r'^news/(?P<post_id>\w+)/$'), ViewPost.as_view(),
                                     name='view-site-post'),
    
    # RSS Feed for the index news ONLY
    url(r'^rss/$', IndexEntriesFeed(), name='site-feed'),
    
    #(r'^api/', include('e_cidadania.apps.api.urls')),

    # This urls is for the django comments system
    url(_(r'^comments/'), include('django.contrib.comments.urls')),

    (r'^jsi18n/$', 'django.views.i18n.javascript_catalog', js_info_dict),

    # This url is for the access to static pages. I hope this doesn't collide
    # with the index view
    url(r'^(?P<slug>[\w\-]+)/', include('apps.ecidadania.staticpages.urls')),
    
    # For smart_selects app
    url(r'^chaining/', include('apps.thirdparty.smart_selects.urls')),

    # WARNING: This URLs aren't supposed to be here, but apparently on development
    # they are needed
)
Exemplo n.º 54
0
urlpatterns = i18n_patterns("",

    # Change the admin prefix here to use an alternate URL for the
    # admin interface, which would be marginally more secure.
    url("^admin/", include(admin.site.urls)),
    url(r'^o/', include('oauth2_provider.urls', namespace='oauth2_provider')),
    url("^inplaceeditform/", include("inplaceeditform.urls")),
    url('^r/(?P<shortkey>[A-z0-9\-_]+)', 'hs_core.views.short_url'),
    url(r'^tracking/reports/profiles/$', tracking.VisitorProfileReport.as_view(),
        name='tracking-report-profiles'),
    url(r'^tracking/reports/history/$', tracking.HistoryReport.as_view(),
        name='tracking-report-history'),
    url(r'^tracking/$', tracking.UseTrackingView.as_view(), name='tracking'),
    url(r'^user/$', theme.UserProfileView.as_view()),
    url(r'^user/(?P<user>.*)/', theme.UserProfileView.as_view()),
    url(r'^comment/$', theme.comment),
    url(r'^rating/$', theme.rating),
    url(r'^profile/$', theme.update_user_profile, name='update_profile'),
    url(r'^deactivate_account/$', theme.deactivate_user, name='deactivate_account'),
    url(r'^delete_irods_account/$', theme.delete_irods_account, name='delete_irods_account'),
    url(r'^create_irods_account/$', theme.create_irods_account, name='create_irods_account'),
    url(r'^email_verify/(?P<new_email>.*)/(?P<token>[-\w]+)/(?P<uidb36>[-\w]+)/',
        theme.email_verify, name='email_verify'),
    url(r'^verify/(?P<token>[0-9a-zA-Z:_\-]*)/', 'hs_core.views.verify'),
    url(r'^django_irods/', include('django_irods.urls')),
    url(r'^autocomplete/', include('autocomplete_light.urls')),
    url(r'^search/$', DiscoveryView.as_view(), name='haystack_search'),
    url(r'^searchjson/$', DiscoveryJsonView.as_view(), name='haystack_json_search'),
    url(r'^sitemap/$', 'hs_sitemap.views.sitemap', name='sitemap'),
    url(r'^collaborate/$', hs_core_views.CollaborateView.as_view(), name='collaborate'),
    url(r'^my-groups/$', hs_core_views.MyGroupsView.as_view(), name='my_groups'),
    url(r'^group/(?P<group_id>[0-9]+)', hs_core_views.GroupView.as_view(), name='group'),
    url(r'^timeseries/sqlite/update/(?P<resource_id>[A-z0-9\-_]+)', hs_ts_views.update_sqlite_file,
        name='update_sqlite_file'),
)
Exemplo n.º 55
0
                       url(r'^sitemap.xml$', TemplateView.as_view(
     template_name='protocols/sitemap.xml', content_type='application/xml')), #TODO generate for all ayas
                        url(r'^api/(?P<action>\w{3,15})/?', api, name='api'),
                         url(r'^jos2', jos2, name='jos2'),

                             url(r'^', include(swagger_ui.urls)),

                    url(r'^r', one_aya_page),

                       # url( r'^a/', include( admin.site.urls)),
]

# These URLs accept the language prefix.
urlpatterns += i18n_patterns(
    url(r'^surah/(?P<surah>[\w\-\ \']{2,20})/ayah/(?P<ayah>\d{1,8})', browse_aya, name='browse_aya'),

    url(r'^$', results, name='results'),
  url(r'^(?P<unit>\w{3,15})/', results, name='results_i18n'),
)

# Fall-back for non-supported languages from URL swich: xx-YY to xx to default (en)
urlpatterns += [
  url(r'^(?P<lang>[a-z]{2})-[A-Za-z]{2}/(?P<path>.*)$', RedirectView.as_view(url='/%(lang)s/%(path)s',query_string=True)),
  url(r'^[a-z]{2}/(?P<path>.*)$', RedirectView.as_view(url='/{}/%(path)s'.format(settings.LANGUAGE_CODE),query_string=True)),
]


# 404 not found handler

handler404 = 'wui.views.custom_404'
Exemplo n.º 56
0
    url(r'^accounts/', include('registration.backends.simple.urls')),

    # foo URLs:
    url(r'^foo/', include('foo.urls')),

    # bar URLs:
    # url(r'^bar/', include('bar.urls')),

    url(r'^$', TemplateView.as_view(template_name=fobi_home_template)),

    # django-fobi public forms contrib app:
    # url(r'^', include('fobi.contrib.apps.public_forms.urls')),
]

if versions.DJANGO_LTE_1_7:
    urlpatterns += i18n_patterns('', *url_patterns_args)
else:
    urlpatterns += i18n_patterns(*url_patterns_args)

# Serving media and static in debug/developer mode.
if settings.DEBUG:
    urlpatterns += staticfiles_urlpatterns()
    urlpatterns += static(settings.MEDIA_URL,
                          document_root=settings.MEDIA_ROOT)

# Conditionally including FeinCMS URls in case if
# FeinCMS in installed apps.
if 'feincms' in settings.INSTALLED_APPS:
    from page.models import Page
    Page
    url_patterns_args = [
Exemplo n.º 57
0
from django.conf.urls import include, url
from django.conf.urls.i18n import i18n_patterns
from oscar.app import application

urlpatterns = [
    url(r'^i18n/', include('django.conf.urls.i18n')),
]
urlpatterns += i18n_patterns(
    url(r'^checkout/paypal/', include('paypal.express.urls')),
    url(r'', application.urls),
)
Exemplo n.º 58
0
from django.conf import settings
from django.conf.urls import include, url, patterns
from django.conf.urls.i18n import i18n_patterns
from django.contrib import admin
from django.conf.urls.static import static

urlpatterns = i18n_patterns('',
    url(r'^admin/', admin.site.urls),
    url(r'^', include('cms.urls')),
    url(r'^', include('djangocms_forms.urls')),
) + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)

if settings.DEBUG:
    import debug_toolbar
    urlpatterns += patterns('',
        url(r'^__debug__/', include(debug_toolbar.urls)),
    )
Exemplo n.º 59
0
from django.conf.urls import *  # NOQA
from django.conf.urls.i18n import i18n_patterns
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.contrib import admin
from django.conf import settings
from cms.sitemaps import CMSSitemap

admin.autodiscover()

urlpatterns = i18n_patterns('',
                            url(r'^admin/', include(admin.site.urls)),  # NOQA
                            url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap',
                                {'sitemaps': {'cmspages': CMSSitemap}}),
                            url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')),
                            url(r'^', include('cms.urls')),
                            )

# This is only needed when using runserver.
if settings.DEBUG:
    urlpatterns = patterns('',
                           url(r'^media/(?P<path>.*)$', 'django.views.static.serve',  # NOQA
                               {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}),
                           ) + staticfiles_urlpatterns() + urlpatterns  # NOQA
Exemplo n.º 60
0
{%- endif %}

i18n_urls = (
    # Django Admin, use {% raw %}{% url 'admin:index' %}{% endraw %}
    # User management
    url(r'^accounts/', include('allauth.urls')),
    # Your stuff: custom urls includes go here
    {% if cookiecutter.use_django_cms == 'y' -%}
    url(r'^admin/', admin.site.urls, name='admin'),  # NOQA
    # CMS - should be last
    url(r'^', include('cms.urls'), name='home'),
    {%- endif %}
)

if settings.USE_I18N:
    urlpatterns.extend(i18n_patterns(*i18n_urls))
else:
    urlpatterns.extend(i18n_urls)
urlpatterns.extend(static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT))


if settings.DEBUG:
    {% if cookiecutter.use_django_cms == 'y' -%}
    # This is only needed when using runserver.
    urlpatterns = [
        url(r'^media/(?P<path>.*)$', serve,
            {'document_root': settings.MEDIA_ROOT, 'show_indexes': True}, name="media"),
        ] + staticfiles_urlpatterns() + urlpatterns

    {%- endif %}