Set field on related table

25 views
Skip to first unread message

Biase D'Agostino

unread,
May 9, 2016, 7:09:43 AM5/9/16
to Django users
Hello,
sorry for the question that might sound silly , but I need help because I'm newbie .
I have 2 tables User ( Name , Surname , BadgeNR ) and Badge (No. , date Activation , Due Date , Available ) .
I use a form to add and arises to change the data of a user,
but I need to set to 0 the Available field of the related Badge . How can I do?

Biase D'Agostino

unread,
May 9, 2016, 7:09:46 AM5/9/16
to Django users
Hello,
sorry for the question that might sound silly , but I need help because i'm newbie .

I have 2 tables User ( Name , Surname , BadgeNR ) and Badge (No. , date Activation , Due Date , Available ) .
I use a form to add and update the data of a user, but I need , also, to set to 0 the Available field of the related Badge .
How can I do?

ludovic coues

unread,
May 9, 2016, 9:29:00 AM5/9/16
to django...@googlegroups.com
If you hare a beginner, you should definitely take a good look at the
django tutorial. It's full of details you need to know to be effective
with django like ForeignKeyField, which let you write
user.Badge.Available = 0
> --
> 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...@googlegroups.com.
> To post to this group, send email to django...@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/7645b90b-ce1d-4f2b-855f-703b7074ff48%40googlegroups.com.
>
> For more options, visit https://groups.google.com/d/optout.



--

Cordialement, Coues Ludovic
+336 148 743 42

Biase D'Agostino

unread,
May 13, 2016, 5:12:55 AM5/13/16
to Django users
thanks
Reply all
Reply to author
Forward
0 new messages