-
Notifications
You must be signed in to change notification settings - Fork 105
Invalid filter: 'as_uni_form' #120
Comments
Can you post a screenshot of the debug traceback? Would you post some of the code you have to render the form? I guess you have I don't have any clue what's happening with what you pasted. If you look at the application tests, there are tests in the application that check the filter and run correctly. Have you tried to run those tests to see if they pass in your machine? It could be some incompatibility with your Python version. Regards, |
what i don't understand is that if i do it in the shell: everything is ok if i run the server from the same env: 0 errors found the template looks like: and in the settings: i'll take a look at he application tests, and see how to pass them on my computer thanks for your help, gerard |
here are the tests results: ......................Ran 22 tests in 0.234s OK i'm lost... |
this issue is hitting me too. python 2.7 upgrading an old app from django 1.2 to 1.3. just started debugging the issue |
This issue has been plaguing me off and on as well. Sometimes a template that has been working perfectly fine with uni_form will start showing this error because of some change made in the view returning the template that affects one of the other variables. I know the issue here isn't necessarily with just uni_form, but somehow uni_form is the always the first victim of any other bugs that may arise in templates. And because the bugs are always pointed in this direction, sometimes it's hard to actually discover what is really broken |
make sure, that you don't have the templates directory of 0.8 still around somewhere. if there is a 'uni_form' directory in your templates dir, it may not properly load the new templates, that come with 0.9 (in the site-packages dir). |
hello,
i've upgraded from 0.8 to 0.9 and now it's broken.
The browser displays errors:
Django Version: 1.3
Exception Type: TemplateSyntaxError
Exception Value:
Invalid filter: 'as_uni_form'
Exception Location: /Users/me/python/virtualenv/myapp/lib/python2.6/site-packages/django/template/base.py in find_filter, line 320
Python Executable: /Users/me/python/virtualenv/myapp/bin/python
Python Version: 2.6.1
Python Path:
['/Users/me/python/virtualenv/myapp/myproj',
...
'/Users/me/python/virtualenv/myapp/lib/python2.6/site-packages/django_uni_form-0.9.0-py2.6.egg-info',
...
As you can see, the PythonPath shows the package directory, in which we have:
-rw-r--r-- 1 me staff 0 11 nov 05:51 init.py
-rw-r--r-- 1 me staff 184 11 nov 05:51 init.pyc
-rw-r--r-- 1 me staff 592 11 nov 05:51 uni_form_field.py
-rw-r--r-- 1 me staff 1164 11 nov 05:51 uni_form_field.pyc
-rw-r--r-- 1 me staff 2371 11 nov 05:51 uni_form_filters.py
-rw-r--r-- 1 me staff 3157 11 nov 05:51 uni_form_filters.pyc
-rw-r--r-- 1 me staff 6711 11 nov 05:51 uni_form_tags.py
-rw-r--r-- 1 me staff 7338 11 nov 05:51 uni_form_tags.pyc
i notice that as_uni_form is defined in:
templatetags/uni_form_filters.py:def as_uni_form(form):
on the other hand, if i test my form in a shell, it works:
Thanks,
The text was updated successfully, but these errors were encountered: