>
> > I have a model in which a field should be generated automatically. So
> > it shouldn't be shown in the admin add page. Also in the change page
> > it should be shown but should be non-editable. As an example-
>
> Pending ticket 342, another way to do this is to make a custom admin
> change_f
On Oct 1, 8:34 am, Ramashish Baranwal <[EMAIL PROTECTED]>
wrote:
> I have a model in which a field should be generated automatically. So
> it shouldn't be shown in the admin add page. Also in the change page
> it should be shown but should be non-editable. As an example-
Pending ticket 342, anoth
Full example here
http://code.djangoproject.com/wiki/NewformsHOWTO#Q:HowdoIchangetheattributesforawidgetonafieldinmymodel.
class MyModelAdmin(admin.ModelAdmin):
...
def formfield_for_dbfield(self, db_field, **kwargs):
field = super(MyModelAdmin,
self).formfield_for_dbfield(db_fiel
On Wed, Oct 1, 2008 at 8:34 AM, Ramashish Baranwal <
[EMAIL PROTECTED]> wrote:
>
> Hi,
>
> I have a model in which a field should be generated automatically. So
> it shouldn't be shown in the admin add page. Also in the change page
> it should be shown but should be non-editable. As an example-
>
Hi,
I have a model in which a field should be generated automatically. So
it shouldn't be shown in the admin add page. Also in the change page
it should be shown but should be non-editable. As an example-
class Student(models.Model):
first = models.CharField(max_length=64)
last = models.
5 matches
Mail list logo