Thanks,
My Media_biz is edited inline in another class. So I have:
class MetadataInline(admin.StackedInline) and
class MetadataAdmin(admin.ModelAdmin)
Can you tell what method I should override and in which class in order
to set the initial value while editing inline?
Regards, Alex Arshavski.
>
> > > I have the following classes in my models.py:
>
> > > class Default(models.Model):
> > > name = models.CharField(max_length=50, choices =
> > > (('rental_period', 'rental_period'), ('currency', 'currency')),
> > > unique=True)
> > > value = models.CharField(max_length=50)
>
> > >
On Feb 5, 3:59 pm, knight wrote:
> Hi,
>
> I have the following classes in my models.py:
>
> class Default(models.Model):
> name = models.CharField(max_length=50, choices =
> (('rental_period', 'rental_period'), ('currency', 'currency')),
> unique=True)
> value = models.CharField(max_leng
Hi,
Thanks for the fast reply.
Each Default instance provide default value for one of the fields:
I want to take the default value of rental_period to rental_period and
default value of currency to currency.
The value of the currency should be the name of Currency object for
foreign key.
Thanks,
On Feb 5, 10:59 am, knight wrote:
> Hi,
>
> I have the following classes in my models.py:
>
> class Default(models.Model):
> name = models.CharField(max_length=50, choices =
> (('rental_period', 'rental_period'), ('currency', 'currency')),
> unique=True)
> value = models.CharField(max_l
Hi,
I have the following classes in my models.py:
class Default(models.Model):
name = models.CharField(max_length=50, choices =
(('rental_period', 'rental_period'), ('currency', 'currency')),
unique=True)
value = models.CharField(max_length=50)
class Media_biz(models.Model):
name =
6 matches
Mail list logo