Re: add marks of same roll number of different of different semestrs
I will presume that you have 2 Student details with the same roll_no
but with different class numbers. If that is not the case, then you
will need to revisit the modelling of your data.
Anyway, something like this would work.
student_details = StudentDetail.objects.get(roll_no=<number>)
for student_detail in student_details:
<etc>
Does that make sense? This would work in the shell, but for a
template, you would need a view for the first bit, and the second in
the template.
cheers
L.
On 19 September 2013 12:22, Harjot Mann <harjotmann1992@gmail.com> wrote:
> On Thu, Sep 19, 2013 at 7:39 AM, Lachlan Musicman <datakid@gmail.com> wrote:
>> Harjot,
>>
>> The answer to your question requires more information.
>>
>> We would need to see your model structure at the least.
>
>
> I want to add the marks of same roll number in different classes as
> given in the screenshot both the rows are of same roll number I want
> to add the marks of physics of class 11th ans 12th according to roll
> number.
> Here id my models. Its simple.
>
> class StudentDetail(models.Model):
> roll_no=models.IntegerField()
> Class=models.CharField(max_length=100, blank=True, null=True)
> physics=models.IntegerField(blank=True, null =True)
> maths=models.IntegerField(blank=True, null =True)
> chemistry=models.IntegerField(blank=True, null =True)
>
> --
> Harjot Kaur Mann
> Blog: http://harjotmann.wordpress.com/
> Daily Dairy: http://harjotmann.wordpress.com/daily-diary/
>
> --
> 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+unsubscribe@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at http://groups.google.com/group/django-users.
> For more options, visit https://groups.google.com/groups/opt_out.
--
Maya Otos (@maya_otos) tweeted at 9:27 PM on Tue, Jul 30, 2013:
When you used to be punk, and now you are still punk but not as punk,
are you post-punk or decaying punk or ex-punk or just not punk anymore
--
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+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
For more options, visit https://groups.google.com/groups/opt_out.
0 Comments:
Post a Comment
Subscribe to Post Comments [Atom]
<< Home