Hello,
I would recommend to create a django form and feed the post data to this form.
Because
1) the form will extract the post data for you
2) in the form you will be able the validate and clean the post data (you should definitively do that)
The code that saves the data to the form could also live in the form.
If the structure of the post data matches the structure of the database model closely, then a model form would be the easiest way.
Regards Roman
2014-06-24 21:33 GMT+02:00 G Z <zukeru@gmail.com>:
for lis in Licenses.objects.values('code'):for post_value in insert_data:if lis in post_value:license_tag += insert_data[lis] + ','so im trying that now but the problem is django is causing issues when iterating over a dictionary i think because its a post dictionary
Exception Value: coercing to Unicode: need string or buffer, dict foundException Location: /home/grant/workspace/Django Projects/trunk/holon/portal/views.py in portal, line 171
insert_data post_value --To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/b4eb8f2f-e98a-437d-8656-1714f958af12%40googlegroups.com.
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 http://groups.google.com/group/django-users.
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 http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL2Rd%3DK_tbbfg0YB38tB_A49XE4rcGxkHUNx4azMzcb-vpKY0A%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment