Commits

Roman Ruban committed 3d816e2

added meta to brands
added search form tag for page

Comments (0)

Files changed (2)

satchmo/apps/satchmo_ext/brand/models.py

     headline = models.CharField(_('headline'), max_length=150, blank=False)
     short_description = models.CharField(_('Short Description'), blank=True, max_length=200)
     description = models.TextField(_('Full Description'), blank=True)
+    meta_title = models.CharField(_('Meta Title'), max_length=150, blank=False)
+    meta_description = models.TextField(_('Meta Description'), blank=True)
     image = ImageField(verbose_name=_('Banner'),
         upload_to="images/brand/",
         null=True, blank=True,
     headline = models.CharField(_('headline'), max_length=150, blank=False)
     short_description = models.CharField(_('Short Description'), blank=True, max_length=200)
     description = models.TextField(_('Description'), blank=True)
+    meta_title = models.CharField(_('Meta Title'), max_length=150, blank=False)
+    meta_description = models.TextField(_('Meta Description'), blank=True)
     picture = ImageField(verbose_name=_('Picture'),
         upload_to="images/brand/",
         null=True, blank=True,

satchmo/apps/satchmo_store/shop/templatetags/satchmo_util.py

     }
 register.inclusion_tag("shop/_search.html", takes_context=False)(satchmo_search_form)
 
+def satchmo_search_inline_form():
+    """
+    Display the search form.
+    """
+    try:
+        url = urlresolvers.reverse('satchmo_search')
+    except urlresolvers.NoReverseMatch:
+        url = ""
+        log.warning('No url found for satchmo_search (OK if running tests)')
+
+    return {
+        'satchmo_search_url' : url,
+        'categories' : None,
+    }
+register.inclusion_tag("shop/_search_inline.html", takes_context=False)(satchmo_search_inline_form)
+
 def pounds(weight):
     """
     Finds the weight of a cart item, taking into consideration the quantity in