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, another way to do this is to make a custom admin change_form template for the particular model (meaning you create admin/appname/modelname/change_form.html), inherit from the main change_form template (admin/change_form.html), and define the "after_field_sets" block. You can refer to your model instance via the variable "original" and display whatever attribute(s) you want. The disadvantage of this method is that you can't control where it appears in the page, it will appear after the fieldset box. Carl --~--~---------~--~----~------------~-------~--~----~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email to [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---