Sorry about this... 

Am Donnerstag, 4. Dezember 2014 09:49:48 UTC+1 schrieb Florian Apolloner:
>
> Hi,
>
> this mailing list is about the development of Django itself. Usage 
> questions should go to django-users.
>
> On Thursday, December 4, 2014 1:16:13 AM UTC+1, inoyon artlover 
> KLANGRAUSCH wrote:
>>
>> I am very beginner in the programming world, so please forgive my lack of 
>> understanding...
>>
>> There is a CustomUserprofile in my models.py.. nothin very special about 
>> this....
>>
>> class Interests(models.Model):
>>
>>     RATING = [(y, y) for y in range(1, 7)]
>>
>>     interest = models.CharField(max_length=40)
>>     interest_rating = models.SmallIntegerField(choices=WEIGHT)
>>
>>
>> class CustomUserprofileInterests(models.Model):
>>
>>     user = models.OneToOneField(User)
>>     interests = models.ManyToManyField(
>>             Interests, through='CustomInterests',
>>             through_fields=('custominterest', 'interest'),
>>             null=True, blank=True)
>>
>>
>> class CustomInterests(models.Model):
>>
>>     WEIGHT = [(y, y) for y in range(1, 7)]
>>
>>     interest = models.ForeignKey(Interests)
>>     custominterest = models.ForeignKey(CustomUserprofileInterests)
>>     rating = models.SmallIntegerField(choices=WEIGHT)
>>
>> I want to accomplish a rating on each relation in the 'interests = 
>> ManyToManyField' in my CustomUserprofile. The Interests-Model HAS to have 
>> an OWN, self relating rating in each 'interest' entry, NOT related to the 
>> CustomUserprofile.
>>
>> Startet lot of investigation and the 'through' option seems to be the 
>> solution? Don't got it really because in my Admin there is NO field to 
>> choose some 'interests' and an option to rate it.
>> Got absolutley NO idea how to do it... find NO way out..... would 
>> appreciate any hints.
>>
>> ManyManyMany thanks in advance! cheers...
>>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-developers+unsubscr...@googlegroups.com.
To post to this group, send email to django-developers@googlegroups.com.
Visit this group at http://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/f1f87ab3-9211-4cd2-8175-eeae12620ca0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to