Hello,
I would like use my custom filter function inside Flatpage template. How 
could I do this?

If I try to load my custom tags model ({% load cust_template_tags %}) I 
get this error:
Traceback (most recent call last):

   File 
"/usr/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", 
line 272, in run
     self.result = application(self.environ, self.start_response)

   File 
"/usr/local/lib/python2.4/site-packages/django/core/servers/basehttp.py", 
line 611, in __call__
     return self.application(environ, start_response)

   File 
"/usr/local/lib/python2.4/site-packages/django/core/handlers/wsgi.py", 
line 152, in __call__
     response = middleware_method(request, response)

   File 
"/usr/local/lib/python2.4/site-packages/django/contrib/flatpages/middleware.py",
 
line 10, in process_response
     return flatpage(request, request.path)

   File 
"/usr/local/lib/python2.4/site-packages/django/contrib/flatpages/views.py", 
line 31, in flatpage
     t = loader.get_template(DEFAULT_TEMPLATE)

   File 
"/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 
79, in get_template
     return get_template_from_string(*find_template_source(template_name))

   File 
"/usr/local/lib/python2.4/site-packages/django/template/loader.py", line 
86, in get_template_from_string
     return Template(source, origin)

   File 
"/usr/local/lib/python2.4/site-packages/django/template/__init__.py", 
line 146, in __init__
     self.nodelist = compile_string(template_string, origin)

   File 
"/usr/local/lib/python2.4/site-packages/django/template/__init__.py", 
line 161, in compile_string
     return parser.parse()

   File 
"/usr/local/lib/python2.4/site-packages/django/template/__init__.py", 
line 258, in parse
     compiled_result = compile_func(self, token)

   File 
"/usr/local/lib/python2.4/site-packages/django/template/defaulttags.py", 
line 692, in load
     raise TemplateSyntaxError, "'%s' is not a valid tag library: %s" % 
(taglib, e)

TemplateSyntaxError: 'cust_template_tags' is not a valid tag library: 
Could not load template library from 
django.templatetags.cust_template_tags, No module named cust_template_tags



I think that there is problem with flatpage view function, which should 
import my custom tags file (somethink like this 
http://www.djangoproject.com/documentation/templates/#c829).

Is there any way to do this in FlatPage template please?


Thank you for any advice.

Regards
Michal

--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/django-users
-~----------~----~----~----~------~----~------~--~---

Reply via email to