One column in table is not getting updated
Hi,
I have added one column in the table of mysql db using 'python
manage.py syncdb' after deleting the table.
Now from the home page, I am fetching the value of text area, and
trying to put in the database. The value when written to flat file, is
same as fetched, but when writing to database, it is inserting null.
The code is-
value fetched by-
submit['grnvalue'] = request.GET.get('grnvalue', '')
g = open('/c/coverity/ngcov.lst', 'a')
g.write("branch=" + submit['branch'] + ";" + "arch=" + submit['arch']
+ ";" + "targets=" + added_tgts + ";" + "schedule=" +
submit['schedule'] + ";grn=" + submit['grnvalue']+"\n")
g.close()
In this file, I am getting the value as put in the text area having id
'grnvalue'.
Now I am saving this to database-
s = Subscribed(name=submit['branch'], status="Subscribed",
targets=added_tgts, architecture=submit['arch'],
release=submit['schedule'], running_time=0, user=owner,
remarks=notify, grn=submit['grnvalue'])
s.save()
The database contains Table Subscribed where I have added column grn.
All values are put, but grn field is filled empty all the time.
Please help me in this issue.
--
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