Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

Update imports from django.conf.urls and avoid import *.

  • Loading branch information...
commit c181344c5a3d979569c49c1826d4d24ebe39b441 1 parent 2d02017
@aaugustin aaugustin authored
View
4 accounts/profile_urls.py
@@ -3,9 +3,9 @@
"""
from __future__ import absolute_import
-from django.conf.urls.defaults import patterns, url, include
+from django.conf.urls import patterns, url, include
from . import views as account_views
-urlpatterns = patterns('',
+urlpatterns = patterns('',
r'^(?P<username>[\w-]+)/$', account_views.user_profile, name='user_profile'),
)
View
2  accounts/urls.py
@@ -1,6 +1,6 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import patterns, url, include
+from django.conf.urls import patterns, url, include
from registration.forms import RegistrationFormUniqueEmail
from . import views as account_views
View
21 aggregator/urls.py
@@ -1,36 +1,37 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
+
from . import views
-urlpatterns = patterns('',
- url(r'^$',
+urlpatterns = patterns('',
+ url(r'^$',
views.index,
- name = 'community-index'
+ name='community-index'
),
- url(r'^mine/$',
+ url(r'^mine/$',
views.my_feeds,
- name = 'community-my-feeds'
+ name='community-my-feeds'
),
url(
r'^(?P<feed_type_slug>[-\w]+)/$',
views.feed_list,
- name = "community-feed-list"
+ name='community-feed-list'
),
url(
r'^add/(?P<feed_type_slug>[-\w]+)/$',
views.add_feed,
- name = 'community-add-feed'
+ name='community-add-feed'
),
url(
r'^edit/(?P<feed_id>\d+)/$',
views.edit_feed,
- name = 'community-edit-feed'
+ name='community-edit-feed'
),
url(
r'^delete/(?P<feed_id>\d+)/$',
views.delete_feed,
- name = 'community-delete-feed'
+ name='community-delete-feed'
),
)
View
2  blog/urls.py
@@ -1,6 +1,6 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
from . import views
View
28 contact/urls.py
@@ -1,26 +1,28 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
from django.views.generic.simple import direct_to_template
+
from contact_form.views import contact_form
+
from .forms import FoundationContactForm
urlpatterns = patterns('',
url(
- regex = r'^foundation/$',
- view = contact_form,
- kwargs = dict(
- form_class = FoundationContactForm,
- template_name = 'contact/foundation.html',
+ regex=r'^foundation/$',
+ view=contact_form,
+ kwargs=dict(
+ form_class=FoundationContactForm,
+ template_name='contact/foundation.html',
),
- name = 'contact_foundation',
+ name='contact_foundation',
),
url(
- regex = r'^sent/',
- view = direct_to_template,
- kwargs = dict(
- template = 'contact/sent.html',
+ regex=r'^sent/',
+ view=direct_to_template,
+ kwargs=dict(
+ template='contact/sent.html',
),
- name = 'contact_form_sent',
+ name='contact_form_sent',
)
-)
+)
View
12 django_docs/urls.py
@@ -1,5 +1,5 @@
-from django.conf import settings
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns, url
+
from haystack.views import search_view_factory
from docs import views
@@ -12,7 +12,7 @@
url(
r'^search/$',
search_view_factory(view_class=views.DocSearchView),
- name = 'document-search'
+ name='document-search'
),
url(
r'^(?P<lang>[a-z-]+)/$',
@@ -22,12 +22,12 @@
r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/$',
views.document,
{'url': ''},
- name = 'document-index',
+ name='document-index',
),
url(
r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_objects/$',
views.objects_inventory,
- name = 'objects-inv',
+ name='objects-inv',
),
url(
r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/_images/(?P<path>.*)$',
@@ -48,6 +48,6 @@
url(
r'^(?P<lang>[a-z-]+)/(?P<version>[\w.-]+)/(?P<url>[\w./-]*)/$',
views.document,
- name = 'document-detail',
+ name='document-detail',
),
)
View
2  django_www/urls.py
@@ -1,7 +1,7 @@
from __future__ import absolute_import
from django.conf import settings
-from django.conf.urls.defaults import patterns, include, url
+from django.conf.urls import patterns, include, url
from django.contrib import admin
from django.contrib.comments.feeds import LatestCommentFeed
from django.contrib.comments.models import Comment
View
3  legacy/urls.py
@@ -4,7 +4,8 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns
+
from .views import gone
urlpatterns = patterns('',
View
3  svntogit/urls.py
@@ -4,7 +4,8 @@
from __future__ import absolute_import
-from django.conf.urls.defaults import *
+from django.conf.urls import patterns
+
from .views import redirect_to_github
urlpatterns = patterns('',
Please sign in to comment.
Something went wrong with that request. Please try again.