master
fefa4ka 10 years ago
parent 16e015ff52
commit d8d23dd0b8
  1. 4
      promo/cms_plugins.py

@ -18,12 +18,14 @@ class PromoPluginPublisher(CMSPluginBase):
promos = Promo.objects.filter(page_link_id__in=history).order_by('?')
context.update({'history': history})
if promos.exists():
promo = promos[0]
promo.text = promo.text.replace('#promo', promo.page_link.get_absolute_url())
context.update({
'instance': promo,
'history': history
})
return context

Loading…
Cancel
Save