diff options
Diffstat (limited to 'app/guide/urls.py')
-rw-r--r-- | app/guide/urls.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/app/guide/urls.py b/app/guide/urls.py index 75a24e5..52222fd 100644 --- a/app/guide/urls.py +++ b/app/guide/urls.py @@ -1,5 +1,6 @@ -from django.conf.urls.defaults import * -from django.views.generic.simple import redirect_to +from django.conf.urls import * +from django.views.generic.base import RedirectView + urlpatterns = patterns('', (r'location/(?P<location>[-\w]+)/(?P<slug>[-\w]+)/$', 'guide.views.guide_detail'), @@ -7,5 +8,5 @@ urlpatterns = patterns('', (r'location/$', 'guide.views.location_list'), (r'(?P<page>\d+)/$', 'guide.views.guide_list'), (r'(?P<slug>[-\w]+)/$', 'guide.views.guide_detail'), - (r'', redirect_to, {'url': '/travel-guide/1/'}), + (r'', RedirectView.as_view(url="/travel-guide/1/")), ) |