Hi,
I'd like to use pagination on my category pages, so I thought the best
way to approach this would be to write a custom view and override the
category urls. I have set up my own category template and view, but my
site keeps displaying the satchmo category view. I know that it's
hitting my template because I have set print statements to indicate
whether i'm reading the product list that I would receive from
Satchmo's category view or my custom category view.
So I think the problem is that I am not overriding the urlpattern
properly. I tried using the urlhelper, but I may not be using it
properly. Here is my urls.py
patterns('mysite.views',
(r'^shop/', 'index.shop_intro', {}, 'mysite_shop_intro'),
(r'^help/$', 'help.faq', {}, 'mysite_faq'),
(r'^help/aboutus/$', 'help.aboutus', {}, 'mysite_aboutus'),
(r'^help/privacy/$', 'help.privacy', {}, 'mysite_privacy'),
(r'^help/shipping/$', 'help.shipping', {}, 'mysite_shipping'),
(r'^help/sizing/$', 'help.sizing', {}, 'mysite_sizing'),
)
replacement = url(r'^category/(?P<parent_slugs>[-\w]+/)*(?P<slug>[-\w]
+)/$', 'mysite.views.index.mysite_category_view', {},
'mysite_category')
urlhelper.replace_urlpattern(urlpatterns, replacement)
urlhelper.remove_duplicate_urls(urlpatterns, [])
but it doesn't work. I had a similar problem overriding the index url
from urls.py, but I managed to work around it by setting that
urlpattern in the SHOP_URLS value in settings.py, but I prefer not to
manage the urls in the settings file if possible.
Does anyone have any ideas? Am I taking the wrong approach here?
Thanks!
Julie
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Satchmo users" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/satchmo-users?hl=en
-~----------~----~----~----~------~----~------~--~---