class Year(models.Model):
year = models.IntegerField()
class Month(models.Model):
MONTH_CHOICE = (
(1 , "Jan"),
(2, 'Feb'),
(3, 'March'),
(4, 'April'),
(5, 'May'),
(6, 'June'),
(7, 'July'),
(8, 'Aug'),
(9, 'Sept'),
Thanks man.👍
On Wed, Jun 16, 2021, 5:22 PM Ayush Bisht wrote:
> I think you are trying to sum up the value of two model fields and store
> them in some other field.
>
>
> so for that u can proceed from base.
>
> simple you just have to update that field in save method
>
> for example :
> *class
I think you are trying to sum up the value of two model fields and store
them in some other field.
so for that u can proceed from base.
simple you just have to update that field in save method
for example :
*class Student(models.Model):*
maths_score = models.DecimalField()
en
Please kindly describe with images.
On Tue, Jun 15, 2021, 9:52 PM Sebastian Jung
wrote:
> Hello,
>
> You create all modelfields inkl. Total sum and after user submit Form with
> 2 fields in save() Method you sum both fields together ans write this in
> total field...
>
> Regards
>
> Ridwan Adeye
Hello,
You create all modelfields inkl. Total sum and after user submit Form with
2 fields in save() Method you sum both fields together ans write this in
total field...
Regards
Ridwan Adeyemo schrieb am Di., 15. Juni 2021,
20:34:
> How do I add two models together in the database, two differe
Thanks for the response. Kindly explain more or provide image description.
Best regards
On Tue, Jun 15, 2021, 8:09 PM patel dhruvish
wrote:
> Use foreign key in 1 model for initiat another model...
>
> On Wed, Jun 16, 2021, 00:04 Ridwan Adeyemo
> wrote:
>
>> How do I add two models together in
Use foreign key in 1 model for initiat another model...
On Wed, Jun 16, 2021, 00:04 Ridwan Adeyemo
wrote:
> How do I add two models together in the database, two different
> DecimalField.
> i.e math_score + eng_score = total_score
>
> --
> You received this message because you are subscribed to
7 matches
Mail list logo