Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Removed usage of django.conf.urls.patterns().

  • Loading branch information...
commit 46b1d7b7a0459a47d21c44724bd6a0942049bed4 1 parent c8eef02
@timgraham timgraham authored
View
10 accounts/profile_urls.py
@@ -1,11 +1,11 @@
"""
URLs for the profile pages (under ~)
"""
+from django.conf.urls import url
-from __future__ import absolute_import
-from django.conf.urls import patterns, url, include
from . import views as account_views
-urlpatterns = patterns('',
- r'^(?P<username>[\w-]+)/$', account_views.user_profile, name='user_profile'),
-)
+
+urlpatterns = [
+ url(r'^(?P<username>[\w-]+)/$', account_views.user_profile, name='user_profile'),
+]
View
10 accounts/urls.py
@@ -1,14 +1,12 @@
-from __future__ import absolute_import
-
-from django.conf.urls import patterns, url, include
-from django.contrib.auth import views as auth_views
+from django.conf.urls import url, include
from registration.forms import RegistrationFormUniqueEmail
from registration.backends.default.views import RegistrationView
from . import views as account_views
-urlpatterns = patterns('',
+
+urlpatterns = [
url(
r'^register/$',
RegistrationView.as_view(form_class=RegistrationFormUniqueEmail),
@@ -22,4 +20,4 @@
url(r'^_trac/userinfo/$', account_views.json_user_info),
url(r'', include('django.contrib.auth.urls')),
url(r'', include('registration.backends.default.urls')),
-)
+]
View
9 aggregator/urls.py
@@ -1,10 +1,8 @@
-from __future__ import absolute_import
-
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from . import views
-urlpatterns = patterns('',
+urlpatterns = [
url(r'^$',
views.index,
name='community-index'
@@ -33,5 +31,4 @@
views.delete_feed,
name='community-delete-feed'
),
-)
-
+]
View
9 blog/urls.py
@@ -1,10 +1,9 @@
-from __future__ import absolute_import
-
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from . import views
-urlpatterns = patterns('',
+
+urlpatterns = [
url(r'^(?P<year>\d{4})/(?P<month>[a-z]{3})/(?P<day>\w{1,2})/(?P<slug>[\w-]+)/$',
views.BlogDateDetailView.as_view()
),
@@ -21,4 +20,4 @@
views.BlogArchiveIndexView.as_view(),
name="blog-index"
),
-)
+]
View
9 contact/urls.py
@@ -1,11 +1,10 @@
-from __future__ import absolute_import
-
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from django.views.generic import TemplateView
from .views import ContactFoundation
-urlpatterns = patterns('',
+
+urlpatterns = [
url(r'^foundation/$', ContactFoundation.as_view(), name='contact_foundation'),
url(r'^sent/$', TemplateView.as_view(template_name='contact/sent.html'), name='contact_form_sent'),
-)
+]
View
7 django_docs/urls.py
@@ -1,4 +1,4 @@
-from django.conf.urls import patterns, url, include
+from django.conf.urls import url
from django.http import HttpResponse
from docs.sitemaps import DocsSitemap
@@ -6,7 +6,8 @@
sitemaps = {'docs': DocsSitemap}
-urlpatterns = docs_urlpatterns + patterns('',
+
+urlpatterns = docs_urlpatterns + [
url(r'^sitemap\.xml$', 'django.contrib.sitemaps.views.sitemap', {'sitemaps': sitemaps}),
url(r'^google79eabba6bf6fd6d3\.html$', lambda req: HttpResponse('google-site-verification: google79eabba6bf6fd6d3.html')),
-)
+]
View
9 django_www/urls.py
@@ -1,8 +1,7 @@
from __future__ import absolute_import
-from django.conf.urls import patterns, include, url
+from django.conf.urls import include, url
from django.contrib import admin
-from django.contrib.flatpages.views import flatpage
from django.contrib.sitemaps import FlatPageSitemap
from django.contrib.sitemaps import views as sitemap_views
from django.shortcuts import render
@@ -22,7 +21,8 @@
'flatpages': FlatPageSitemap,
}
-urlpatterns = patterns('',
+
+urlpatterns = [
url(r'^$', TemplateView.as_view(template_name='homepage.html'), name="homepage"),
url(r'^accounts/', include('accounts.urls')),
url(r'^admin/', include(admin.site.urls)),
@@ -60,7 +60,8 @@
url(r'^download/', include('releases.urls')),
url(r'^svntogit/', include('svntogit.urls')),
url(r'', include('legacy.urls')),
-)
+]
+
@requires_csrf_token
def handler500(request):
View
7 docs/urls.py
@@ -1,10 +1,11 @@
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from haystack.views import search_view_factory
from . import views
-urlpatterns = patterns('',
+
+urlpatterns = [
url(
r'^$',
views.index,
@@ -58,4 +59,4 @@
r'^pots/(?P<pot_name>\w+\.pot)$',
views.pot_file,
),
-)
+]
View
16 legacy/urls.py
@@ -1,15 +1,13 @@
"""
Legacy URLs for documentation pages.
"""
-
-from __future__ import absolute_import
-
-from django.conf.urls import patterns
+from django.conf.urls import url
from .views import gone
-urlpatterns = patterns('',
- (r'^comments/', gone),
- (r'^rss/comments/$', gone),
- (r'^documentation', gone),
-)
+
+urlpatterns = [
+ url(r'^comments/', gone),
+ url(r'^rss/comments/$', gone),
+ url(r'^documentation', gone),
+]
View
8 releases/urls.py
@@ -1,10 +1,8 @@
-from __future__ import absolute_import, unicode_literals
-
-from django.conf.urls import patterns, url
+from django.conf.urls import url
from .views import index, redirect
-urlpatterns = patterns('',
+urlpatterns = [
url(r'^$', index, name='download'),
url(r'^([0-9a-z_.-]+)/(tarball|checksum|egg)/$', redirect, name='download-redirect'),
-)
+]
View
11 svntogit/urls.py
@@ -1,13 +1,10 @@
"""
Legacy URLs for changesets.
"""
-
-from __future__ import absolute_import
-
-from django.conf.urls import patterns
+from django.conf.urls import url
from .views import redirect_to_github
-urlpatterns = patterns('',
- (r'^(\d+)/?$', redirect_to_github),
-)
+urlpatterns = [
+ url(r'^(\d+)/?$', redirect_to_github),
+]
View
7 tracdb/urls.py
@@ -1,10 +1,11 @@
-from django.conf.urls import patterns, url
+from django.conf.urls import url
+
from . import views
-urlpatterns = patterns('',
+urlpatterns = [
url(
r'^bouncing/$',
views.bouncing_tickets,
name='bouncing_tickets',
),
-)
+]
Please sign in to comment.
Something went wrong with that request. Please try again.