Пример #1
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url

from website.views import IndexView
from common.seo import sitemaps


urlpatterns = patterns('',
                       url(r'^$', IndexView.as_view(), name='index'),

                       # Sitemap & SEO
                       url(r'^sitemap\.xml$',
                           'django.contrib.sitemaps.views.sitemap',
                           {'sitemaps': sitemaps}),
                       url(r'^robots\.txt$', 'common.seo.robots'),
                       url(r'^favicon\.ico$', 'common.seo.favicon'),

                       # Captcha
                       url(r'^captcha/(?P<code>[\da-f]{32})/$',
                           'supercaptcha.draw'),
                       )

# Gallery
from gallery.urls import urlpatterns as gallery_urls
urlpatterns += gallery_urls

# Common
from website.urls import urlpatterns as website_urls
urlpatterns += website_urls

# Pages urls must be last pattern
Пример #2
0
from django.conf.urls import patterns, include, url
from website.views import IndexView, SessionAPIListView, SessionAPIRetrieveView

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name='home'),
    url(r'^api/sessions/$', SessionAPIListView.as_view(), name='list'),
    url(r'^api/sessions/(?P<pk>\d+)/$',
        SessionAPIRetrieveView.as_view(),
        name='retrieve'),
)
Пример #3
0
from django.views.decorators.cache import never_cache
from ckeditor_uploader import views as ck_upload_views
from rest_framework import routers
from reservations import views as reservation_views

handler404 = 'website.views.handler404'
handler500 = 'website.views.handler500'

# Add rest framework urls
router = routers.DefaultRouter()
router.register(r'reservations', reservation_views.ReservationsViewSet)

urlpatterns = router.urls

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('admin/', admin.site.urls),
    path(
        'robots.txt',
        TemplateView.as_view(template_name='website/robots.txt',
                             content_type='text/plain')),
    path('tos/', MostRecentTermsOfServiceView.as_view(), name='tos'),
    path('tos/returning-user/',
         AcceptTosView.as_view(),
         name='tos-returningls'),
    path('tos/accept/', AcceptTosRedirectView.as_view(), name='tos-accept'),
    path('tos/create/', TermsOfServiceCreateView.as_view(), name='tos-create'),
    path('tos/create/<int:pk>/',
         TermsOfServiceCreateView.as_view(),
         name='tos-create-id'),
    path('tos/<int:pk>/', TermsOfServiceView.as_view(), name='tos-details'),
Пример #4
0
from django.urls import path

from website.views import (
    BookInfoView,
    ChapterDetailView,
    IndexView,
    AboutView,
    LoginView,
    UserCenterView,
    BookMarketView,
)

app_name = "website"

urlpatterns = [
    path("", IndexView.as_view(), name="index"),
    path("about", AboutView.as_view(), name="about"),
    path("bookmarket", BookMarketView.as_view(), name="bookmarket"),
    path("bookinfo/<int:pk>", BookInfoView.as_view(), name="bookinfo"),
    path("chapter/<int:pk>",
         ChapterDetailView.as_view(),
         name="chapter_detail"),
    path("usercenter", UserCenterView.as_view(), name="usercenter"),
    path("login", LoginView.as_view(), name="login"),
    # path("", HomePageView.as_view(), name="home"),
    # path("formset", DefaultFormsetView.as_view(), name="formset_default"),
    # path("form", DefaultFormView.as_view(), name="form_default"),
    # path("form_by_field", DefaultFormByFieldView.as_view(), name="form_by_field"),
    # path("form_horizontal", FormHorizontalView.as_view(), name="form_horizontal"),
    # path("form_inline", FormInlineView.as_view(), name="form_inline"),
    # path("form_with_files", FormWithFilesView.as_view(), name="form_with_files"),
Пример #5
0
from filebrowser.sites import site
from django.contrib import admin

admin.autodiscover()

# Includes
urlpatterns = patterns(
    '',
    (r'^accounts/', include('accounts.urls')),
    #(r'^test/', include('s_test.urls')),
    (r'^tinymce/', include('tinymce.urls')),
    (r'^grappelli/', include('grappelli.urls')),
    url(r'^admin/filebrowser/', include(site.urls)),
    url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
    url(r'^admin/', include(admin.site.urls)),
)

urlpatterns += patterns(
    '',
    url(r'^$', IndexView.as_view(), name='index'),
    #    url(r'^music/?$', 'views.music', name='music'),
    #url(r'^music/Media/[\w.]*$', redirect_to, {'url': '/media/filtersourcesound.mp3'}),
    # url(r'^study/', include('study.foo.urls')),
    (r'^(?P<page_url>.*?)[/]?$', PageView.as_view()),
)

##includes
#urlpatterns += patterns('testing.views',
#    (r'^testing/', include('testing.urls')),
#)
Пример #6
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url

from website.views import IndexView


urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(),
        name='website-index'),
    url(r'^contact/$', 'website.views.contact',
        name='website-contact'),

    # -------------------------------------------------------------------------
    # API views
    # -------------------------------------------------------------------------
    url(r'^api/contact/$',
        'website.views.api_contact',
        name='api-website-contact'),
    url(r'^api/task/result/(?P<task_id>.+)/$',
        'website.views.api_task_result',
        name='api-website-task-result'),

    url(r'^api/server-info/$',
        'website.views.api_server_info',
        name='api-website-server-info-no-token'),
    url(r'^api/server-info/(?P<update_token>\w+)/$',
        'website.views.api_server_info',
        name='api-website-server-info'),
)
from django.conf.urls import patterns, include, url
from website.views import IndexView, SessionAPIListView, SessionAPIRetrieveView

urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='home'),
    url(r'^api/sessions/$', SessionAPIListView.as_view(), name='list'),
    url(r'^api/sessions/(?P<pk>\d+)/$', SessionAPIRetrieveView.as_view(), name='retrieve'),
)
Пример #8
0
from website.views import IndexView
from django.urls import path


app_name = 'website'

urlpatterns = [
    path('', IndexView.as_view())
]
Пример #9
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url

from website.views import IndexView


urlpatterns = patterns('',
    url(r'^$', IndexView.as_view(), name='website.index'),
)
Пример #10
0
# -*- coding: utf-8 -*-
from django.conf.urls import patterns, url

from website.views import IndexView

urlpatterns = patterns(
    '',
    url(r'^$', IndexView.as_view(), name='website-index'),
    url(r'^contact/$', 'website.views.contact', name='website-contact'),

    # -------------------------------------------------------------------------
    # API views
    # -------------------------------------------------------------------------
    url(r'^api/contact/$',
        'website.views.api_contact',
        name='api-website-contact'),
    url(r'^api/task/result/(?P<task_id>.+)/$',
        'website.views.api_task_result',
        name='api-website-task-result'),
    url(r'^api/server-info/$',
        'website.views.api_server_info',
        name='api-website-server-info-no-token'),
    url(r'^api/server-info/(?P<update_token>\w+)/$',
        'website.views.api_server_info',
        name='api-website-server-info'),
)
Пример #11
0
from django.urls import path

from website.views import IndexView

urlpatterns = [
    path('done/', IndexView.as_view(), name='done'),
    path('wizard/<wizard_id>/step/<step_num>/', IndexView.as_view(), name='wizard_step')
]
Пример #12
0
from django.conf import settings
from django.contrib.auth import views as auth_views

# Add this back to re-enable the admin side.
# path('admin/', admin.site.urls),

urlpatterns = [
    path('admin/', admin.site.urls),
    path('accounts/login/', auth_views.login, name='login'),
    path('accounts/logout/', auth_views.logout, name='logout'),
    url(r'accounts/resetpw/',
        auth_views.password_reset,
        {'post_reset_redirect': '/accounts/resetpwdone/'},
        name="password_reset"),
    path(r'', PageView.as_view(), name="index"),
    path(r'home/', IndexView.as_view(), name="home"),
    path(r'imagebrowser/', ImageBrowserView.as_view(), name="imagebrowser"),
    url(r'^article/(?P<slug>[a-zA-Z0-9\-_]+)/$',
        ArticleView.as_view(),
        name="article"),
    url(r'^editArticle/(?P<slug>[a-zA-Z0-9\-_]+)/$',
        ArticleEditView.as_view(),
        name="edit_article"),
    url(r'^newArticle/$', NewArticleView.as_view(), name="new_article"),
    url(r'^toc/(?P<slug>[a-zA-Z0-9\-_]+)/$', TocView.as_view(), name="toc"),
    url(r'^page/(?P<slug>[a-zA-Z0-9\-_]+)/$', PageView.as_view(), name="page"),
    url(r'^imageupload/(?P<slug>[a-zA-Z0-9\-_]+)/$',
        ImageUpload.as_view(),
        name="imageupload"),
    url(r'^fileupload/(?P<slug>[a-zA-Z0-9\-_]+)/$',
        FileUpload.as_view(),
Пример #13
0
from django.conf import settings
from django.urls import include, path, re_path
from django.contrib import admin
from django.contrib.staticfiles.urls import staticfiles_urlpatterns
from django.urls import path
from django.views.generic import TemplateView
from django.views.static import serve as static_serve
from website.views import IndexView, AcceptTosRedirectView, AboutView

handler404 = 'website.views.handler404'
handler500 = 'website.views.handler500'

urlpatterns = [
    path('', IndexView.as_view(), name='index'),
    path('tos/', TemplateView.as_view(template_name="website/tos.html"), name='tos'),
    path('tos/returning-user/', TemplateView.as_view(template_name="website/tos-returningls.html"), name='tos'),
    path('tos/accept/', AcceptTosRedirectView.as_view(), name='tos'),
    path('admin/', admin.site.urls),
    path('robots.txt', TemplateView.as_view(template_name='website/robots.txt',
                                             content_type='text/plain')),
    path('news/', include('news.urls')),
    path('events/', include('news.event_urls')),
    path('ckeditor/', include('ckeditor_uploader.urls')),
    path('authentication/', include('authentication.urls', namespace='auth')),
    path('door/', include('door.urls')),
    path('opptak/', include('applications.urls'), name='opptak'),
    path('files/', include('files.urls')),
    path('about/', AboutView.as_view(), name='about'),
    path('s/', include('django.contrib.flatpages.urls')),
    path('profile/', include('userprofile.urls')),
    path('internal/', include('internal.urls'))
Пример #14
0
    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.contrib import admin
from django.views.generic.base import TemplateView, RedirectView

from website.views import test_http_code_500, IndexView

urlpatterns = [
    url(r"^admin/", admin.site.urls),
    # url(r'^$', RedirectView.as_view(url='/ts_om/', permanent=False), name="index"),
    url(r'^$', IndexView.as_view(), name="index"),
    # robots.txt is implemented as a template because Django can't seem to serve a static file from urls.py
    url(r'^robots.txt$', TemplateView.as_view(template_name="robots.txt")),
    # Please refer to https://docs.djangoproject.com/en/1.8/topics/auth/default/#using-the-views
    # for additional information about using django.contrib.auth.urls
    url(r'^auth/', include('django.contrib.auth.urls')),
    url(r'^test_500/$', test_http_code_500, name="test_http_code_500"),
    url(r'^ts_om/', include('website.apps.ts_om.urls')),
    url(r'^ts_om_edit/', include('website.apps.ts_om_edit.urls')),
    url(r'^ts_om_viz/', include('website.apps.ts_om_viz.urls')),
    url(r'^validate/', include('website.apps.om_validate.urls')),
    url(r'^big_brother/', include('website.apps.big_brother.urls')),
]

try:  # pragma: no cover
    # If django_auth_pubtkt is installed, add sso/ to url patterns