Re: ManyToManyField with rating using 'through' on each ManyToMany relation in Django

2014-12-06 Thread Collin Anderson
Hi, To limit the number or rows in an inline, max_num is usually the way to go. https://docs.djangoproject.com/en/dev/ref/contrib/admin/#django.contrib.admin.InlineModelAdmin.max_num As far as having the list of all possibilities available as options goes, it gets a little more complicated and I

Re: ManyToManyField with rating using 'through' on each ManyToMany relation in Django

2014-12-05 Thread inoyon artlover KLANGRAUSCH
Did it in this fashion: models.py class Interests(models.Model): ORDER = [(y, y) for y in range(10, 200, 10)] interest = models.CharField( verbose_name='Interesse', max_length=40) interest_order = models.SmallIntegerField(default=None, choices=ORDER) interest_active = models.BooleanField(def

Re: ManyToManyField with rating using 'through' on each ManyToMany relation in Django

2014-12-05 Thread Collin Anderson
Hi, Create an admin Inline like this: class CustomInterestsInline(admin.TabularInline): model = CustomInterests class CustomUserprofileInterests(admin.ModelsAdmin): inlines = [CustomInterestsInline] Collin On Thursday, December 4, 2014 5:58:31 AM UTC-5, inoyon artlover KLANGRAUSCH wr