Hello,

thank you so much for your reply.

Yes, 'myapp' is listed in the INSTALLED_APPS

This' why the static files I have installed loads ok.  When i put the {% 
load nimbisshop_tags %} on top of my index.html file I get this error

'nimbisshop_tags' is not a registered tag library. Must be one of: 
accounts_tags admin_list admin_modify admin_static admin_urls blog_tags 
cache comment_tags comments compress disqus_tags fb_csrf fb_pagination 
fb_tags future highlighting i18n indent_text keyword_tags l10n log 
mezzanine_tags pages_tags rating_tags shop_tags static staticfiles 
syntax_color truncate_letters twitter_tags tz widont


Your reply would be greatly appreciated.


Regards

On Tuesday, 16 August 2016 03:02:59 UTC+1, Jesse Ramirez wrote:
>
> Like so, usually at the very top of the file:
>
> {% load nimbisshop_tags %}
>
> this could also be:
>
> {% load nimbisshop_tags, static, mezzanine_tags, "and so on ..." %}
>
> also remember that with: <yourapp>/templatetags/nimbisshop_tags.py, 
> 'yourapp' needs to be included in INSTALLED_APPS in settings.py.
>
> On Mon, Aug 15, 2016 at 5:26 PM, akos1234 <gorge...@msn.com <javascript:>> 
> wrote:
>
>> Hello Brian,
>>
>> I am trying to load do as suggested below but I get an error -
>> Invalid block tag on line 114: 'nimbisshop_latest'. Did you forget to 
>> register or load this tag?
>>
>> I get the error inside my index.html
>>
>> I thought it was due to a nested tag but I moved it outside, still the 
>> message persists. 
>>
>> add nimbisshop_tags to the {% load list %}
>>
>> Could anyone explain the above a little bit more, please? Anything I am 
>> missing out?
>>
>> Thanking you regards
>>
>>
>> On Wednesday, 5 December 2012 20:04:10 UTC, Brian Schott wrote:
>>
>>> Here is a quick copy paste of what we do if you want to use a 
>>> templatetag as a starting point.
>>>
>>> Brian
>>>
>>> templates/pages/index.html
>>> == add nimbisshop_tags to the {% load list %}
>>> == insert something like this:
>>>
>>> <h3> Latest Software </h3>
>>> {% nimbisshop_latest "catalog" "span2" 3 %}
>>>
>>> <yourapp>/templatetags/nimbisshop_tags.py 
>>> ===
>>> from cartridge.shop.models import Category, Product
>>> register = template.Library()
>>>
>>> @register.inclusion_tag("includes/nimbisshop_latest.html")
>>> def nimbisshop_latest(category, span, count):
>>>     try:
>>>         category = Category.objects.get(slug=category)
>>>         products = category.products.filter(
>>>             available=True).order_by('-publish_date')[0:count]
>>>     except Category.DoesNotExist:
>>>         products = []
>>>     return {'span': span, 'products': products}
>>> ===
>>>
>>> <yourapp>/templates/includes/nimbisshop_latest.html 
>>> ===
>>> {% load static %}
>>> <ul class="thumbnails">
>>> {% for p in products %}
>>>   <li class="{{ span }}">
>>>     <div class="thumbnail">
>>>     <a href="{{ p.get_absolute_url }}">
>>>       <img 
>>>       src="{% get_media_prefix %}{{ p.image }}" alt="">
>>>       <h4>{{ p.title }}</h4></a>
>>>     </div>
>>>   </li>
>>> {% endfor %}
>>> </ul>
>>> ===
>>>
>>>
>>>
>>> On Dec 5, 2012, at 8:15 AM, Ken Bolton <kenb...@gmail.com> wrote:
>>>
>>> Hi Jesse,
>>>
>>> Mezzanine and Cartridge are "just" Django applications, which is 
>>> probably my favorite thing about the stack. To get a list of products onto 
>>> the homepage, start by adding a custom view that adds the queryset of 
>>> Products you want to the context, set that view in the url pattern, then 
>>> iterate over the context list in the template.
>>>
>>> Let us know if you need more specific details.
>>>
>>> best,
>>> Ken
>>>
>>>
>>> On Tue, Dec 4, 2012 at 7:14 PM, Jesse Ramirez <jesus.rami...@gmail.com> 
>>> wrote:
>>>
>>>> I'm not sure if this has been covered, but what is the best/recommended 
>>>> way of adding products to the homepage in mezzanine with cartridge? 
>>>
>>>
>>>
>>> -- 
>> You received this message because you are subscribed to the Google Groups 
>> "Mezzanine Users" group.
>> To unsubscribe from this group and stop receiving emails from it, send an 
>> email to mezzanine-use...@googlegroups.com <javascript:>.
>> For more options, visit https://groups.google.com/d/optout.
>>
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to mezzanine-users+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to