Kai Diefenbach  committed c3a96a2

Added signal for shop changed

  • Participants
  • Parent commits 61a50b8

Comments (0)

Files changed (3)

File lfs/caching/

 from lfs.core.signals import cart_changed
 from lfs.core.signals import product_changed
 from lfs.core.signals import category_changed
+from lfs.core.signals import shop_changed
 from lfs.core.signals import topseller_changed
 from import Topseller
 from lfs.order.models import OrderItem
 # reviews imports
 from reviews.signals import review_added
+# Shop
+def shop_changed_listener(sender, **kwargs):
+    clear_cache()
 # Cart
 def cart_changed_listener(sender, **kwargs):

File lfs/core/

 # django imports
 import django.dispatch
+# Shop
+shop_changed = django.dispatch.Signal()
 # Catalog
 cart_changed = django.dispatch.Signal()
 category_changed = django.dispatch.Signal()

File lfs/manage/views/

 import lfs.core.utils
 from lfs.caching.utils import lfs_get_object_or_404
 from lfs.core.models import Shop
+from lfs.core.signals import shop_changed
 from lfs.core.utils import LazyEncoder
 from lfs.core.widgets.image import LFSImageInput
 from lfs.manage.views.lfs_portlets import portlets_inline
     if request.method == "POST":
         form = ShopForm(instance=shop, data=request.POST, files=request.FILES)
         if form.is_valid():
             return lfs.core.utils.set_message_cookie(
                 url = reverse("lfs_manage_shop"),
                 msg = _(u"Shop data has been saved."),
     form = ShopDefaultValuesForm(instance=shop, data=request.POST)
     if form.is_valid():
+        shop =
+        shop_changed.send(shop)
         message = _(u"Shop default values have been saved.")
         message = _(u"Please correct the indicated errors.")