Browse Source

Correct URL regex for reviews

Had fallen out of sync with the core product URLs as it still used a
hyphen instead of an underscore.
master
David Winterbottom 13 years ago
parent
commit
d3f0157b08
2 changed files with 3 additions and 2 deletions
  1. 1
    1
      oscar/apps/catalogue/app.py
  2. 2
    1
      oscar/apps/catalogue/reviews/app.py

+ 1
- 1
oscar/apps/catalogue/app.py View File

@@ -29,7 +29,7 @@ class ReviewsApplication(Application):
29 29
     def get_urls(self):
30 30
         urlpatterns = super(ReviewsApplication, self).get_urls()
31 31
         urlpatterns += patterns('',
32
-            url(r'^(?P<product_slug>[\w-]*)-(?P<product_pk>\d+)/reviews/',
32
+            url(r'^(?P<product_slug>[\w-]*)_(?P<product_pk>\d+)/reviews/',
33 33
                 include(self.reviews_app.urls)),
34 34
         )
35 35
         return self.post_process_urls(urlpatterns)

+ 2
- 1
oscar/apps/catalogue/reviews/app.py View File

@@ -1,5 +1,6 @@
1
-from oscar.core.application import Application
2 1
 from django.conf.urls import patterns, url
2
+
3
+from oscar.core.application import Application
3 4
 from oscar.apps.catalogue.reviews import views
4 5
 
5 6
 

Loading…
Cancel
Save