name='root', kwargs={'path': ''}), # Disabled for now # url('^_search/$', # import_class(self.search_view_class).as_view(), # name='search'), re_path('^_revision/diff/(?P<revision_id>[0-9]+)/$', self.article_diff_view, name='diff'), ] return urlpatterns spaces_wiki_url_patterns = [ re_path(r'^notes/', get_wiki_pattern( namespace=None, url_config_class=SpaceWikiURLPatterns ) ), ] # dirty hack to prevent code duplication: # django-wiki's decorator get_article() has hardcoded 'wiki' namespaces # for redirects. # We insert those urlpaths manually so that we can still provide the same # app_name pattern ('spaces_<pluginname>') as all the other Spaces plugins # while keeping things mostly DRY. wiki_url_patterns = [ re_path('^notes/(?P<path>.+/|)$', views.SpaceArticleView.as_view(), name='get'), re_path('^notes/(?P<path>.+/|)_create/$', views.SpaceCreate.as_view(), name='create'), re_path('^notes/(?P<path>.+/|)_deleted/$', views.SpaceDeleted.as_view(), name='deleted'), ]
name='get'), ] return urlpatterns def get_article_path_urls(self): urlpatterns = [ url('^some-other-prefix/(?P<path>.+/|)$', self.article_view_class.as_view(), name='get'), ] return urlpatterns urlpatterns = [ url(r'^notify/', get_notify_pattern()), url(r'', get_wiki_pattern(url_config_class=WikiCustomUrlPatterns)) ] if DJANGO_VERSION < (1, 8): urlpatterns = patterns('', *urlpatterns) class ArticleModelReverseMethodTest(TestCase): urls = 'wiki.tests.test_urls' @wiki_override_settings( WIKI_URL_CONFIG_CLASS='wiki.tests.test_models.WikiCustomUrlPatterns') def test_get_absolute_url_if_urlpath_set_is_not_exists__no_root_urlconf( self):
url(r'', include(admin.site.urls)), url(r'^jsi18n/$', javascript_catalog, js_info_dict), # permite tradução de arquivos JS # bibliotecas url( r'^admin/salmonella/', include('salmonella.urls') ), # url necessária para o funcionamento da biblioteca django-salmonella url( r'^selectable/', include('selectable.urls') ), # url necessária para o funcionamento da biblioteca django-selectable url( r'^schedule/', include('schedule.urls') ), # url necessária para o funcionamento da biblioteca django-scheduler url( r'^diagrama_sistema/', include('django_spaghetti.urls') ), # url necessária para o funcionamento da biblioteca django-spaghetti-and-meatballs url( r'^wiki-site/notifications/', get_nyt_pattern() ), # url necessária para o funcionamento da biblioteca django-wiki (sistema de notificações) url(r'^wiki-site/', get_wiki_pattern() ), # url necessária para o funcionamento da biblioteca django-wiki url(r'^su/', include('django_su.urls') ), # url necessária para o funcionamento da biblioteca django-su # urls das aplicações url( r'^admin/salmonella/(?P<app_name>[\w-]+)/(?P<model_name>[\w-]+)/(?P<id>\d+)/$', checa_foreignkey_habilitada), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
2. Add a URL to urlpatterns: url(r'^blog/', include('blog.urls')) """ from django.conf.urls import url, include from django.contrib import admin urlpatterns = [ url(r'^admin/', admin.site.urls), url(r'', include('index.urls')), ] # django-wiki from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern urlpatterns += [ url(r'^notifications/', get_nyt_pattern()), url(r'^wiki', get_wiki_pattern()) ] #urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) #django-rest-framework from django.contrib.auth.models import User from rest_framework import serializers, viewsets, routers # Serializers define the API representation. class UserSerializer(serializers.HyperlinkedModelSerializer): class Meta: model = User fields = ('url', 'username', 'email', 'is_staff')
# Page place-holder for things that aren't implemented yet. url(r'^tbi/', 'game.gamesrc.oasis.web.website.views.to_be_implemented'), # Admin interface url(r'^admin/doc/', include('django.contrib.admindocs.urls')), url(r'^admin/', include(admin.site.urls)), # favicon url(r'^favicon\.ico$', RedirectView.as_view(url='/media/images/favicon.ico')), # ajax stuff url(r'^webclient/',include('game.gamesrc.oasis.web.webclient.urls', namespace="webclient")), # Wiki url(r'^notify/', get_notify_pattern()), url(r'^wiki/', get_wiki_pattern()), # Forum (r'^forum/', include('bb_urls', namespace='djangobb')), # Favicon (r'^favicon\.ico$', RedirectView.as_view(url='/media/images/favicon.ico')), # Registration stuff url(r'^roster/', include('roster.urls', namespace='roster')), # Character related stuff. url(r'^character/', include('character.urls', namespace='character')), # Mail stuff url(r'^mail/', include('mail.urls', namespace='mail')),
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 from django.contrib.auth import views as auth_views from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern admin.autodiscover() urlpatterns = [ # wiki: url(r'^wiki/notifications/', get_nyt_pattern()), url(r'wiki/', get_wiki_pattern()), # user auth: url(r'^login/$', auth_views.login, name='login'), url(r'^logout/$', auth_views.logout, name='logout'), url(r'^', include('djangocms_forms.urls')), # xml sitemap by django cms: url(r'^sitemap\.xml$', sitemap, {'sitemaps': { 'cmspages': CMSSitemap }}), ] urlpatterns += i18n_patterns( url(r'^admin/', include(admin.site.urls)), # NOQA url(r'^', include('cms.urls')),
from as2 import settings from django.conf.urls import url, patterns, include from django.contrib import admin from wiki.urls import get_pattern as get_wiki_pattern from as2.settings import STATIC_URL from coming_soon.views import survey_detail admin.autodiscover() urlpatterns = patterns('', url(r'^favicon\.ico$', 'django.views.generic.simple.redirect_to', {'url': STATIC_URL+'img/favicon.ico'}), url(r'^admin/', include(admin.site.urls)), url(r'^/?', include('coming_soon.urls')), url(r'^/?', include('menu.urls')), url(r'^api/', include('api.urls')), url(r'^surveys/', include('survey.urls')), (r'^accounts/', include('registration.backends.simple.urls')), (r'^wiki/?', get_wiki_pattern()), ) if settings.DEBUG: urlpatterns += patterns('', (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), (r'^(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT}), )
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. 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 url, include from django.contrib import admin from django.contrib.auth.views import logout from wiki.urls import get_pattern as get_wiki_pattern from naboj_zona.struct_wiki.urls import get_domain_pattern from naboj_zona.core import views urlpatterns = [ url(r'^$', views.index, name='index'), url(r'^admin/', admin.site.urls), url(r'^domains/', get_domain_pattern()), url(r'^articles/', get_wiki_pattern()), url(r'^login/$', views.login, name='login'), url(r'^login/done/$', views.login_done, name='login_done'), url(r'^logout/$', logout, {'next_page': '/'}, name='logout'), url('', include('social.apps.django_app.urls', namespace='social')), ]
url(r'^reset/(?P<uidb64>[0-9A-Za-z_\-]+)/(?P<token>.+)/$', auth_views.PasswordResetConfirmView.as_view(), name='password_reset_confirm'), url(r'^reset/done/$', auth_views.PasswordResetCompleteView.as_view(), name='password_reset_complete'), url(r'^register/$', RegisterForm.as_view(), name='register_form'), url(r'^register/success$', TemplateView.as_view(template_name='pages/register.html'), name='register_success'), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) urlpatterns += [ url(r'^notifications/', get_nyt_pattern()), url(r'^wiki/', get_wiki_pattern(url_config_class=CustomWikiUrlPatterns), name='wiki') ] if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. 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, kwargs={'exception': Exception('Page not Found')}),
# coding: utf-8 from django.urls import include, re_path from django.contrib import admin from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_notify_pattern from django.conf.urls.static import static from .settings import base as settings admin.autodiscover() urlpatterns = [ # Examples: #re_path(r'^$', include('wikiDerby.views.home', namespace='home')), # url(r'^blog/', include('blog.urls')), re_path(r'^admin/', admin.site.urls), re_path(r'^notify/', get_notify_pattern()), re_path(r'', get_wiki_pattern()), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) # Following is the url configuration for django-wiki. It puts the wiki in / so # it’s important that it is the last entry in urlpatterns. You can also put it # in /wiki by putting '^wiki/' as the pattern. #urlpatterns += patterns('', # url(r'^notify/', django_notify.url.get_pattern()), # #)
return urlpatterns def get_article_path_urls(self): urlpatterns = [ re_path( "^some-other-prefix/(?P<path>.+/|)$", self.article_view_class.as_view(), name="get", ), ] return urlpatterns urlpatterns = [ re_path(r"^notify/", include("django_nyt.urls")), re_path(r"", get_wiki_pattern(url_config_class=WikiCustomUrlPatterns)), ] @wiki_override_settings( WIKI_URL_CONFIG_CLASS="tests.core.test_models.WikiCustomUrlPatterns", ROOT_URLCONF="tests.core.test_urls", ) class ArticleModelReverseMethodTest(TestCase): def test_get_absolute_url_if_urlpath_set_is_not_exists__no_root_urlconf( self): a = Article.objects.create() url = a.get_absolute_url() expected = "/some-prefix/1/"
url(_(r'^accounts/'), include('allauth.urls')), url(_(r'^avatar/'), include('avatar.urls')), url(_(r'^accounts/profile/'), TemplateView.as_view( template_name='profile.html'), name='roots_profile'), url(_(r'^competitions/'), include('competitions.urls')), url(_(r'^comments/'), include('fluent_comments.urls')), url(_(r'^events/'), include('events.urls')), url(_(r'^leaflets/'), include('leaflets.urls')), url(_(r'^problems/'), include('problems.urls')), url(_(r'^posts/'), include('posts.urls')), url(_(r'^photos/'), include('photos.urls')), url(_(r'^photos/'), include('photologue.urls', namespace='photologue')), url(_(r'^profiles/'), include('profiles.urls')), url(_(r'^schools/'), include('schools.urls')), url(_(r'^protected/'), include('downloads.urls')) ) # Add django-wiki related patterns urlpatterns += i18n_patterns('', (_(r'^wiki/notify/'), get_notify_pattern()), (_(r'^wiki/'), get_wiki_pattern()), ) if settings.DEBUG: import debug_toolbar urlpatterns += i18n_patterns('', url(r'^__debug__/', include(debug_toolbar.urls)), )
admin.site.get_urls = create_custom_admin_urls(admin.site.get_urls()) urlpatterns = [ url(r"^admin/", admin.site.urls), url(r"^tasks/", include(testovac.tasks.urls)), url(r"^news/", include(news.urls)), url(r"^submit/", include(testovac.submit.urls)), url(r"^results/", include(testovac.results.urls)), url(r"^login/", include(testovac.login.urls)), url(r"^achievements/", include(testovac.achievements.urls)), ] urlpatterns += [ url(r"^notifications/", get_nyt_pattern()), url(r"^$", lambda r: HttpResponseRedirect("wiki/"), name="root"), url(r"^wiki/", get_wiki_pattern()), ] if settings.DEBUG: import debug_toolbar urlpatterns += [ url( r"^media/(?P<path>.*)$", serve, { "document_root": settings.MEDIA_ROOT, }, ), url(r"^__debug__/", include(debug_toolbar.urls)), ]
# -*- coding: utf-8 -*- from django.conf.urls import patterns, url, include from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib import admin admin.autodiscover() from wiki.urls import get_pattern as get_wiki_pattern # for wiki from django_nyt.urls import get_pattern as get_nyt_pattern # for wiki urlpatterns = staticfiles_urlpatterns() + patterns('', (r'^', include('yats.check.urls')), url(r'^', include('yats.urls')), url(r'^admin/', include(admin.site.urls)), (r'^notifications/', get_nyt_pattern()), # for wiki (r'^wiki/', get_wiki_pattern()), # for wiki )
from dashboard.sites import DashboardSite js_info_dict = { 'domain': 'djangojs', 'packages': ('estagio',), } admin.site = DashboardSite() admin.sites.site = admin.site admin.autodiscover() urlpatterns = [ # django url(r'^doc/', include('django.contrib.admindocs.urls')), url(r'', include(admin.site.urls)), url(r'^jsi18n/$', javascript_catalog, js_info_dict), # permite tradução de arquivos JS # bibliotecas url(r'^admin/salmonella/', include('salmonella.urls')), # url necessária para o funcionamento da biblioteca django-salmonella url(r'^selectable/', include('selectable.urls')), # url necessária para o funcionamento da biblioteca django-selectable url(r'^schedule/', include('schedule.urls')), # url necessária para o funcionamento da biblioteca django-scheduler url(r'^diagrama_sistema/', include('django_spaghetti.urls')), # url necessária para o funcionamento da biblioteca django-spaghetti-and-meatballs url(r'^wiki-site/notifications/', get_nyt_pattern()), # url necessária para o funcionamento da biblioteca django-wiki (sistema de notificações) url(r'^wiki-site/', get_wiki_pattern()), # url necessária para o funcionamento da biblioteca django-wiki url(r'^su/', include('django_su.urls')), # url necessária para o funcionamento da biblioteca django-su # urls das aplicações url(r'^admin/salmonella/(?P<app_name>[\w-]+)/(?P<model_name>[\w-]+)/(?P<id>\d+)/$', checa_foreignkey_habilitada), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import patterns, include, url from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern from django.contrib import admin admin.autodiscover() urlpatterns = patterns('', # : # url(r'^$', 'crc.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/$', include(admin.site.urls)), url(r'^$', 'crc.views.home', name='home'), url(r'^faculty/$', 'crc.views.faculty', name='faculty'), url(r'^postdocs/$', 'crc.views.postdocs', name='postdocs'), url(r'^topics/$', 'crc.views.topics', name='topics'), url(r'^groups/$', 'crc.views.groups', name='groups'), url(r'^courses/$', 'crc.views.courses', name='courses'), ) urlpatterns += patterns('', (r'wiki/notifications/', get_nyt_pattern()), (r'wiki/', get_wiki_pattern()), )
from django.contrib import admin from django.contrib.auth.views import login, logout from django.conf import settings from django.conf.urls.static import static from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern # from django.views.generic import RedirectView urlpatterns = [ #url(r'^$', RedirectView.as_view(url='https://fachschaft-medizin-rostock.de/'), name='root'), url(r'^admin/', admin.site.urls), url(r'^login/$', login, {'template_name': 'login.html'}, name='fsmedhro_login'), url(r'^logout/$', logout, {'template_name': 'logout.html'}, name='fsmedhro_logout'), url(r'^fachschaft/', include('fsmedhrocore.urls', namespace='fachschaft')), url(r'^exoral/', include('exoral.urls')), url(r'^mediathek-app/', include('mediathek.urls', namespace='mediathek')), url(r'^api/fachschaft/', include('fsmedhrocore.api.urls', namespace='fsmedhrocore-api')), url(r'^api/exoral/', include('exoral.api.urls', namespace='exoral-api')), url(r'^taggit_autosuggest/', include('taggit_autosuggest.urls')), url(r'^cms-forms/', include('djangocms_forms.urls')), url(r'^data/', include('filer.urls')), url(r'^notifications/', get_nyt_pattern()), url(r'^pharos/', get_wiki_pattern()), url(r'^', include('cms.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
from django.conf.urls import include, url from django.contrib import admin from django.contrib.staticfiles.urls import staticfiles_urlpatterns from django.contrib.auth.views import login, logout from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern from ajax_select import urls as ajax_select_urls urlpatterns = [ # Examples: url(r'^notifications/', get_nyt_pattern()), url(r'^help/', get_wiki_pattern()), url(r'^rest/', include('apps.rest.urls')), url(r'^$', 'web.views.home', name='home'), url(r'^core/', include('apps.core.urls')), url(r'^mail/', include('apps.mail.urls')), url(r'^tools/', include('apps.mail.tools_urls')), url(r'^mail_review/', include('apps.mail.review_urls')), url(r'^setting/', include('apps.mail.setting_urls')), url(r'^check_list/', include('apps.mail.check_list_urls')), url(r'^tech_support/', include('apps.mail.tech_support_urls')), url(r'^flag/', include('apps.flag.urls')), url(r'^collect/', include('apps.collect.urls')), url(r'^collect_mail/', include('apps.collect_mail.urls')), url(r'^cmail/', include('apps.collect_mail.urls')), url(r'^collect_mail_review/', include('apps.collect_mail.review_urls')), url(r'^cmail_review/', include('apps.collect_mail.review_urls')), # url(r'^collect_check_list/', include('apps.collect_mail.check_list_urls')), # url(r'^collect_setting/', include('apps.collect_mail.setting_urls')), url(r'^api-auth/', include('rest_framework.urls', namespace='rest_framework')),
template_name='snippets/set_notification.html')), name="set_notification"), # Pattern for serving media while developing (r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.STATIC_ROOT}), ) # Use Open ID if available # if ("django_openid_auth" in settings.INSTALLED_APPS): urlpatterns += patterns( "", (r'^openid/', include('django_openid_auth.urls')) ) # Use Wiki if it's there # if ("wiki" in settings.INSTALLED_APPS): from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_notify_pattern urlpatterns += patterns( '', (r'^notification/', get_notify_pattern()), (r'^wiki/', get_wiki_pattern()), (r'^wiki', get_wiki_pattern()) )
from django.conf.urls import patterns, include, url from wiki.urls import get_pattern as get_wiki_pattern from django_notify.urls import get_pattern as get_notify_pattern # Uncomment the next two lines to enable the admin: # from django.contrib import admin # admin.autodiscover() urlpatterns = patterns( "", # Examples: # url(r'^$', 'qpywiki.views.home', name='home'), # url(r'^qpywiki/', include('qpywiki.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)), (r"^notify/", get_notify_pattern()), (r"", get_wiki_pattern()), )
from wiki_allatra_club.reader.views import ReaderView urlpatterns = [ url(r'^reader/(?P<slug>[\w-]+)/', ReaderView.as_view(), name="reader"), url(r'^api/', include('wiki_allatra_club.api.urls', namespace='api')), # Django Admin url(r'^admin/', include(admin.site.urls)), # User management url(r'^users/', include("wiki_allatra_club.users.urls", namespace="users")), url(r'^accounts/', include('allauth.urls')), url(r'^i18n/', include('django.conf.urls.i18n')), # Django-wiki url patterns url(r'^notifications/', get_nyt_pattern()), url(r'^', get_wiki_pattern()), url(r'^robots\.txt$', include('robots.urls')), ] + static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT) if settings.DEBUG: # This allows the error pages to be debugged during development, just visit # these url in browser to see how these error pages look like. urlpatterns += [ url(r'^400/$', 'django.views.defaults.bad_request'), url(r'^403/$', 'django.views.defaults.permission_denied'), url(r'^404/$', 'django.views.defaults.page_not_found'), url(r'^500/$', 'django.views.defaults.server_error'), ]
# Configure umessages compose view so that it uses recipient autocompletion url(r'^messages/compose/$', messages_views.message_compose, kwargs={'compose_form': AutoCompleteComposeForm}, name='userena_umessages_compose'), # Form at the bottom of message list doesn't use autocompletion url(r'^messages/reply/$', messages_views.message_compose, name='userena_umessages_reply'), url(r'^messages/', include('userena.contrib.umessages.urls')), (r'^newsletters/', include('emencia.django.newsletter.urls')), # Wiki (r'^notify/', get_notify_pattern()), (r'^wiki/', get_wiki_pattern()), #(r'^ajax_select/', include('ajax_select.urls')), url(r'^ajax_lookup/(?P<channel>[-\w]+)/$', 'ajax_select.views.ajax_lookup', name = 'ajax_lookup' ), url(r'^add_popup/(?P<app_label>\w+)/(?P<model>\w+)/$', 'ajax_select.views.add_popup', name = 'add_popup' ), (r'^jsi18n/(?P<packages>\S+?)/$', 'django.views.i18n.javascript_catalog'), )
), ] return urlpatterns def get_article_path_urls(self): urlpatterns = [ url('^some-other-prefix/(?P<path>.+/|)$', self.article_view_class.as_view(), name='get'), ] return urlpatterns urlpatterns = [ url(r'^notify/', get_notify_pattern()), url(r'', get_wiki_pattern(url_config_class=WikiCustomUrlPatterns)) ] @wiki_override_settings(WIKI_URL_CONFIG_CLASS='tests.core.test_models.WikiCustomUrlPatterns', ROOT_URLCONF='tests.core.test_urls') class ArticleModelReverseMethodTest(TestCase): def test_get_absolute_url_if_urlpath_set_is_not_exists__no_root_urlconf(self): a = Article.objects.create() url = a.get_absolute_url() expected = '/some-prefix/1/' self.assertEqual(url, expected)
from django.conf.urls import patterns, include, url from django.conf import settings # Uncomment the next two lines to enable the admin: from django.contrib import admin admin.autodiscover() urlpatterns = patterns( "", # Examples: # url(r'^$', 'buddhawaj.views.home', name='home'), # url(r'^buddhawaj/', include('buddhawaj.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)), ) from wiki.urls import get_pattern as get_wiki_pattern from django_notify.urls import get_pattern as get_notify_pattern urlpatterns += patterns("", (r"^notify/", get_notify_pattern()), (r"", get_wiki_pattern())) if not settings.PRODUCTION: urlpatterns += patterns( "", url(r"^cache/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.CACHE_ROOT}), url(r"^wiki/images/(?P<path>.*)$", "django.views.static.serve", {"document_root": settings.IMAGES_ROOT}), )
from django.conf.urls import patterns, include, url from django.contrib import admin from django.conf import settings from django.conf.urls.static import static urlpatterns = patterns( '', # Examples: # url(r'^$', 'HSWiki.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), url(r'^accounts/', include('hsauth.urls')), url(r'^accounts/profile/$', 'wiki-extra.views.index'), ) from wiki.urls import get_pattern as get_wiki_pattern urlpatterns += patterns('', (r'', get_wiki_pattern())) + static( settings.STATIC_URL, document_root=settings.STATIC_ROOT)
from django.conf.urls import url from django.contrib import admin from django.conf.urls.static import static from django.conf import settings from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern from . import views urlpatterns = [ url(r'^notifications/', get_nyt_pattern()), url(r'^wiki/', get_wiki_pattern(), name='wiki'), url(r'^$', views.index, name='index'), url(r'^data/(?P<hash>[0-9a-f]{128})/(?P<filename>.*)$', views.protected_data, name='get_data'), url(r'^(?P<cl>[\w]+)/(?P<id>[0-9]+)/(?P<slug>[\w\-0-9_]+)/$', views.get, name='get_check'), # url(r'^project/(?P<project_id>[0-9]+)/(?P<project_slug>[\w]+)/$', views.project, name='project'), # url(r'^whitepaper/(?P<paper_id>[0-9]+)/(?P<paper_slug>[\w]+)/$', views.paper, name='paper'), # url(r'^paper/data/(?P<paper_id>[0-9]+)$', views.protected_data, name='protected_data'), # url(r'^{}(?P<path>.*)$'.format(settings.DATA_URL[1:]), views.protected_data, {'file_root': settings.DATA_FOLDER}), ] + static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)
"""codewiki URL Configuration The `urlpatterns` list routes URLs to views. For more information please see: https://docs.djangoproject.com/en/1.10/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. 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 url from django.contrib import admin from wiki.urls import get_pattern as get_wiki_pattern from django_nyt.urls import get_pattern as get_nyt_pattern urlpatterns = [ url(r'^admin/', admin.site.urls), ] urlpatterns += [ url(r'^notifications/', get_nyt_pattern()), url(r'', get_wiki_pattern()) ]
if request.user.groups.filter(name='Guest').exists(): from django.http import HttpResponseRedirect from django.urls import reverse from django.contrib import messages messages.error(request, 'Guests are not allowed to change their password, you have been automatically redirected to this page') return HttpResponseRedirect(reverse('admin:app_list', kwargs={'app_label': 'collection_management'})) else: return f(request, **kwargs) return decorator ################################################# # URL PATTERNS # ################################################# from wiki.plugins.attachments.views import AttachmentDownloadView urlpatterns = [ url(r'^wiki/(?P<article_id>[0-9]+)/plugin/attachments/download/(?P<attachment_id>[0-9]+)/$', login_required(AttachmentDownloadView.as_view())), url(r'^notifications/', include('django_nyt.urls')), url(r'^wiki/', decorated_includes(wiki_check_login_guest, get_wiki_pattern())), url(r'^password_change/$', check_guest(auth_views.PasswordChangeView.as_view(success_url=reverse_lazy('admin:password_change_done')))), url(r'', my_admin_site.urls), ] if settings.DEBUG is True: urlpatterns += static(settings.MEDIA_URL, document_root=settings.MEDIA_ROOT)
# coding: utf-8 from django.conf.urls import patterns, include, url from django.contrib import admin from wiki.urls import get_pattern as get_wiki_pattern from django_notify.urls import get_pattern as get_notify_pattern admin.autodiscover() urlpatterns = patterns('', # Examples: # url(r'^$', '{{ project_name }}.views.home', name='home'), # url(r'^blog/', include('blog.urls')), url(r'^admin/', include(admin.site.urls)), ) # Following is the url configuration for django-wiki. It puts the wiki in / so # it’s important that it is the last entry in urlpatterns. You can also put it # in /wiki by putting '^wiki/' as the pattern. urlpatterns += patterns('', url(r'^notify/', get_notify_pattern()), url(r'', get_wiki_pattern()) )
login_required(views.remove_follower_dataset), name="profile_remove_follower_dataset", ), # url(r'^$', 'engage.views.home', name='home'), # url(r'^engage/', include('engage.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)), # (r'^search/autocomplete/',views.autocomplete), # (r'autocomplete/',views.autocomplete_template), # url(r'^searchApp$', views.search, name='searchApp'), # (r'^appsearch/$', 'engage.engage.searchApp.searchApp.views.search'), # (r'^search/', include('haystack.urls')), # url(r'^search/person/', search_view_factory( # view_class=SearchView, # template='autocomplete.html', # form_class=AutocompleteModelSearchForm # ), name='autocomplete'), url(r"^wiki/", get_wiki_pattern()), url(r"^notify/", get_notify_pattern()), (r"^favicon\.ico$", RedirectView.as_view(url="/s/imgs/favicon.ico")), url(r"^datastories", include("articles.urls")), url(r"^autocomplete/", include("autocomplete_light.urls")), url(r"api/doc/", include("tastypie_swagger.urls", namespace="tastypie_swagger")), # Hackathon url(r"^hackathon$", views.hackathon, name="hackathon"), url(r"^datathon$", views.datathon, name="datathon"), url(r"^hackathon/thanks$", views.thanks, name="hackathonThanks"), )