start with pretty urls
This commit is contained in:
Родитель
eff5008db5
Коммит
3f5bd655ce
|
@ -0,0 +1,16 @@
|
|||
from django.conf.urls.defaults import patterns, url, include
|
||||
from django.shortcuts import redirect
|
||||
|
||||
|
||||
# These will all start with /addon/<addon_id>/
|
||||
detail_patterns = patterns('',
|
||||
# ('^$', views.addon_detail, name='addons.detail'),
|
||||
|
||||
('^reviews/', include('reviews.urls')),
|
||||
)
|
||||
|
||||
|
||||
urlpatterns = patterns('',
|
||||
# URLs for a single add-on.
|
||||
('^addon/(?P<addon_id>\d+)/', include(detail_patterns)),
|
||||
)
|
|
@ -3,5 +3,5 @@ from django.conf.urls.defaults import patterns, url
|
|||
from . import views
|
||||
|
||||
urlpatterns = patterns('',
|
||||
url('^display/(\d+)$', views.review_list, name='reviews.list'),
|
||||
url('^$', views.review_list, name='reviews.list'),
|
||||
)
|
||||
|
|
6
urls.py
6
urls.py
|
@ -9,9 +9,9 @@ urlpatterns = patterns('',
|
|||
url('^$', 'jingo.views.direct_to_template',
|
||||
{'template': 'base.html'}, name='home'),
|
||||
|
||||
# Reviews.
|
||||
('^reviews/', include('reviews.urls')),
|
||||
|
||||
# Add-ons.
|
||||
('', include('addons.urls')),
|
||||
|
||||
# Users
|
||||
('^users/', include('users.urls')),
|
||||
|
||||
|
|
Загрузка…
Ссылка в новой задаче