Monday, December 26, 2011

Re: compiling python files in django

I assume that you are performing these functions in a view.

I would test the value
grn=submit['grnvalue'])

by rendering this to a template and see what 'gm' spits out.
This way you will find out what is sitting in the variable

On Dec 26, 4:33 am, Mohammad Shahid Siddiqui
<m.shahid.siddi...@gmail.com> wrote:
> 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.
>
> --
> Best Regards,
> *M Shahid Siddiqui*
>
> DISCLAIMER:
> This message is intended solely for the use of the individual to whom it is
> addressed. It may contain privileged or confidential information and should
> not be circulated or used for any purpose other than for what it is
> intended. If you have received this message in error, please notify the
> originator immediately. If you are not the intended recipient, you are
> notified that you are strictly prohibited from using, copying, altering, or
> disclosing the contents of this message and you will delete the mail.
> Sender accepts no responsibility for loss or damage arising from the use of
> the information transmitted by this email including any damage from virus.
> Ce courriel et les pièces jointes s'y rattachant sont de nature
> personnelle, privilégiée et confidentielle et pour l'usage exclusif du
> destinataire à qui ils sont adressés et destinés. Si vous avez reçu ce
> courriel par erreur, veuillez s'il vous plaît le renvoyer à l'expéditeur.
> Si vous n'êtes pas le bon destinataire ou si vous croyez ne pas l'être,
> nous vous informons immédiatement que la publication, distribution,
> diffusion, copie ou plagiat de ce courriel et de ses pièces jointes sont
> strictement interdits.

--
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.

No comments:

Post a Comment