Tuesday, November 29, 2016

How does django pass data through post?

The problem is in your html. Browsers can only send data for inputs with a `name` attribute, which Django then uses as the key in the querydict, whereas the `value` attribute becomes the value for that key.

None of your inputs have names. It also doesn't make sense to add the id to the form or standalone; again, the browser just won't do anything with it.
--
DR.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/2c585c96-4d7c-4d6e-b842-d9215487fb1a%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment