brand url patterns not populated

Issue #1420 new
Anonymous created an issue

i tried to enable the brand application, but the urls did not get registered out of the box (the admin side of the story worked well, i.e. the admin urls worked). here's the diff of what i changed to make it work:

{{{

!text

--- /home/aumoana/satchmo/build/lib/satchmo_ext/brand/models.py 2012-06-03 02:05:04.000000000 -0500 +++ /home/aumoana/lib/python2.7/Satchmo-0.9.3-py2.7.egg/satchmo_ext/brand/models.py 2012-06-09 00:38:53.000000000 -0500 @@ -5,6 +5,7 @@ from l10n.mixins import TranslatedObjectMixin import product from product.models import Product +from satchmo_store import shop from satchmo_utils.thumbnail.field import ImageWithThumbnailField from signals_ahoy.signals import collect_urls import logging @@ -178,4 +179,4 @@

#import config
from urls import add_brand_urls -collect_urls.connect(add_brand_urls, sender=product) +collect_urls.connect(add_brand_urls, sender=shop) --- /home/aumoana/satchmo/build/lib/satchmo_ext/brand/urls.py 2012-06-03 02:05:04.000000000 -0500 +++ /home/aumoana/lib/python2.7/Satchmo-0.9.3-py2.7.egg/satchmo_ext/brand/urls.py 2012-06-09 00:36:30.000000000 -0500 @@ -21,6 +21,6 @@ )

def add_brand_urls(sender, patterns=(), section="", **kwargs): - if section=="init": log.debug('adding brand urls at %s', brandbase) patterns += brandpatterns +

}}}

Comments (2)

  1. scrapper

    same here + importing via standard urls.py worked but for some very strange reason broke the django debug toolbars DJDT icon load. After removing DJDT icon was displayed again. All other images where presented perfectly as always. ... I try to fix satchmo_ext.brand urls similar as you showed in your approach. thank you

  2. scrapper

    1) The problem described with the django debug toolbar i could fix via upgrading from django-debug-toolbar v0.8.5 to v0.9.4 sudo pip install django-debug-toolbar==0.9.4

    2) The problem with satchmo_ext/brand i solved by directly importing via urls.py. Now you can comment out(remove) the lasts lines -> collect_urls in brand/models.py, they are not needed anymore.

    3) +remove/comment-out the def add_brand_urls function in brand/urls.py

    Now brand app works well.

  3. Log in to comment