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
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
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
3 matches
Mail list logo