django-ajax-validation icon indicating copy to clipboard operation
django-ajax-validation copied to clipboard

View needs to check for 'fields[]' instead of 'fields'?

Open intrepidclass opened this issue 14 years ago • 6 comments

Maybe this has just something to do with the version of jQuery or django i'm using, but for me the validation of individual fields doesn't work until I change the two mentions of 'fields' to 'fields[]' in views.py. So it becomes:

if request.POST.getlist('fields[]'): fields = request.POST.getlist('fields[]') + ['all']

instead of:

if request.POST.getlist('fields'): fields = request.POST.getlist('fields') + ['all']

(i accidentally closed a copy of this issue and can't figure out how to open it, so I'm creating a new one :-p )

intrepidclass avatar Nov 15 '10 20:11 intrepidclass

I have this issue too

applecat avatar Jun 22 '11 05:06 applecat

You guys are using jQuery dataTables plugin, right?

maraujop avatar Oct 21 '11 09:10 maraujop

I'm not, actually I've never heard of it... :-)

intrepidclass avatar Oct 21 '11 13:10 intrepidclass

then Nginx? :D thanks for answering

maraujop avatar Oct 21 '11 13:10 maraujop

I've never heard of dataTables too ) I'm using nginx, but this issue occured on dev server too.

applecat avatar Oct 21 '11 14:10 applecat

Same here. Also use nginx, but I ran into this issue while developing with the django built in web server.

intrepidclass avatar Oct 21 '11 19:10 intrepidclass