Re: Populate database from views
Hi,
if you have data in array list just use this
for list in array_list:
modelObj = YourModel()
modelObj.fieldname = list
modelObj.save()
I believe it will help you... Thank you for visiting http://www.f2finterview.com/web/Django/
On Thu, Oct 25, 2012 at 3:05 PM, Coulson Thabo Kgathi <zeecolly@gmail.com> wrote:
is it possible to do this?
i have data that i recieve into the view from my template and i want to save that data which is in an array in my view to a database
anybody help or link to where i can learn a way to do that
thanks a lot
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/cXkin2Cr8XEJ.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
--
Thanks & Regards
Stephen S
Website: www.f2finterview.com
Blog: blog.f2finterview.com
Tutorial: tutorial.f2finterview.com
Group: www.charvigroups.com
--
You received this message because you are subscribed to the Google Groups "Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to django-users+unsubscribe@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/django-users?hl=en.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home