Permalink
Browse files

Moved to newer classytags

  • Loading branch information...
1 parent 246e6dc commit 68a53908503fc1d2407859a1f1add1f40d11d024 Jonas Obrist committed Aug 11, 2011
Showing with 6 additions and 23 deletions.
  1. +1 −1 docs/getting_started/installation.rst
  2. +4 −21 menus/templatetags/menu_tags.py
  3. +1 −1 setup.py
@@ -13,7 +13,7 @@ Requirements
* `Django`_ 1.2.5 (or a 1.3.x release).
* `South`_ 0.7.2 or higher
* `PIL`_ 1.1.6 or higher
-* `django-classy-tags`_ 0.3.2 or higher
+* `django-classy-tags`_ 0.3.4.1 or higher
* `django-mptt`_ 0.4.2 or higher
* `django-sekizai`_ 0.4.2 or higher
* An installed and working instance of one of the databases listed in the
@@ -1,8 +1,7 @@
# -*- coding: utf-8 -*-
-from classytags.arguments import IntegerArgument, Argument
+from classytags.arguments import IntegerArgument, Argument, StringArgument
from classytags.core import Options
from classytags.helpers import InclusionTag
-from classytags.values import StringValue
from django import template
from django.conf import settings
from django.contrib.sites.models import Site
@@ -18,22 +17,6 @@
class NOT_PROVIDED: pass
-class StrictStringValue(StringValue):
- errors = {
- "clean": "%(value)s is not a string",
- }
- value_on_error = ""
-
- def clean(self, value):
- if not isinstance(value, basestring):
- return self.error(value, 'type')
- return value
-
-
-class StrictStringArgument(Argument):
- value_class = StrictStringValue
-
-
def cut_after(node, levels, removed):
"""
given a tree of nodes cuts after N levels
@@ -121,9 +104,9 @@ class ShowMenu(InclusionTag):
IntegerArgument('to_level', default=100, required=False),
IntegerArgument('extra_inactive', default=0, required=False),
IntegerArgument('extra_active', default=1000, required=False),
- StrictStringArgument('template', default='menu/menu.html', required=False),
- StrictStringArgument('namespace', default=None, required=False),
- StrictStringArgument('root_id', default=None, required=False),
+ StringArgument('template', default='menu/menu.html', required=False),
+ StringArgument('namespace', default=None, required=False),
+ StringArgument('root_id', default=None, required=False),
Argument('next_page', default=None, required=False),
)
View
@@ -29,7 +29,7 @@
classifiers=CLASSIFIERS,
install_requires=[
'Django>=1.2.5',
- 'django-classy-tags>=0.3.3',
+ 'django-classy-tags>=0.3.4.1',
'south>=0.7.2',
'django-mptt>=0.4.2',
'django-sekizai>=0.4.2',

0 comments on commit 68a5390

Please sign in to comment.