- changed status to open
Write form not working with ajax_select
The TextArea in the write form doesn't appear, after configuring to use "ajax_select".
Versions: django-postman: 1.2.1 django-ajax-selects: 1.3 django: 1.4.2
Settings: AJAX_LOOKUP_CHANNELS = { 'users': {'model': 'auth.user', 'search_field': 'username'}, } POSTMAN_DISALLOW_ANONYMOUS = True POSTMAN_AUTO_MODERATE_AS = True POSTMAN_AUTOCOMPLETER_APP = { 'arg_default': 'users', }
Comments (6)
-
repo owner -
repo owner Where does your django-ajax-selects 1.3 come from ? The last official release seems to be 1.2.5
-
Yes sorry, its of course postman 2.1.1. For ajax_select I thought it's version 1.3 because of the version entry in the according init.py of the package, but it seems that it is indeed version 1.2.5 (its the newest on github). The application works very well without ajax_select, but when I define the 'arg_default' parameter the write form doesn't appear.
-
repo owner Your problem can't be reproduced. Please give more details and traces. Look at the runserver console ; Consider DEBUG=True in settings.py ; Investigate with Firebug, ...
-
Ok, fixed it. It was my fault, because I forgot to add the ajax_select specific url-entries in the url.py . The form initialization in your write()-method from views.py throws a ReverseMatch error silently and this leads to a non appearing TextArea in the form.
Just as a suggestion, maybe it would be nice to throw a real error when the form could not be initialized and not fail silently.
Thanks for your help and sorry for taking your time.
-
repo owner - changed status to invalid
The NoReverseMatch exception is thrown from the ajax_select code and it is the normal behaviour of Django to be silent on the rendering failure of a template variable.
- Log in to comment
There is no 1.2.1 version of django-postman. Do you mean 2.1.1 ?
Is it a new install ? or did it work before and it doesn't anymore since one or more changes ? (which ones ?) Did you try a version 1.2.x of ajax-select ?