Форум сайта python.su
Привет, осваиваю сабж, всё (вроде бы) установил, django 1.3.1, django-cms 2.2, что в документации было сказано установить - установил на FreeBSD.
Django-cms запускается, работает, попытался создать меню, как в документации - дописал в шаблон примера строчки:
{% load menu_tags %}
<ul>
{% show_menu 0 100 100 100 %}
</ul>
Exception Type: TemplateSyntaxError
Exception Value:
'menu_tags' is not a valid tag library: ImportError raised loading menus.templatetags.menu_tags: cannot import name StringArgument
Exception Location: /usr/local/lib/python2.6/site-packages/django/template/defaulttags.py in load, line 1054
Python Executable: /usr/local/bin/python
Python Version: 2.6.7
Офлайн
Сам себе отвечаю: некоторые порты Python приложений Django во FreeBSD отличаются по версии в минор. В частности, www/py-django-classy-tags привела к такой вот ошибке.
Но, зато в портах FreeBSD ПРИСУТСТВУЕТ нужная версия www/py-django-mptt, ибо некоторые (0.5.1, 0.5.2) приводят к краху django-cms.
Офлайн
хочу продолжить тему скажите пожалуйста где формируется и передается в шаблон menu.html
{% for child in children %} <li class="{% if child.ancestor %}ancestor{% endif %} {% if child.selected %} active{% endif %} {% if child.children %}menuid17 dropdown{% endif %}"> {% if child.children %} <a style="float:left;" href="{{ child.get_absolute_url }}" class="dropdown-toggle {% if child.ancestor %}ancestor{% endif %}"> <span class="glyphicon glyphicon-book"></span> {{ child.get_menu_title }}</a>{% endif %} </li> <li class="{% if child.ancestor %}ancestor{% endif %} {% if child.selected %} active{% endif %} {% if child.children %}menuid17 dropdown{% endif %}"> {% if child.children %} <a style="" href="{{ child.get_absolute_url }}" class="dropdown-toggle {% if child.ancestor %}ancestor{% endif %}" data-toggle="dropdown"><b class="caret"></b></a> <ul class="dropdown-menu"> {% show_menu from_level to_level extra_inactive extra_active template "" "" child %} </ul> {% else %} <a href="{{ child.get_absolute_url }}"><span>{{ child.get_menu_title }}</span></a> {% endif %} </li> {% if class and forloop.last and not forloop.parentloop %}{% endif %} {% endfor %}
Офлайн