On Tue, 2006-08-08 at 00:37 -0700, ak wrote: > Hello guys > > Today I discovered a strange problem which may be caused by my > misunderstanding or by a bug in django and i would like to shed some > light on it with your help.
I think you are misunderstanding how the admin application interacts with models. Whether or not a model shows up in the administration interface is *soley* determined by whether it has an inner Admin class on the model definition. You don't need to write a separate application or anything like that to control the admin appearance -- it's a property of the model. For example: class FirstModel(models.Model): # ... (field definitions) ... class SecondModel(models.Model): # ... (field definitions) ... class Admin: pass # add options here if you like The second model will appear in the admin interface. The first one will not (because it does not have an Admin class). [...] > So is it possible to use classes defined outside application/models.py > in application's admin ? Not unless they are imported into application.models and have their own Admin inner class. Regards, Malcolm --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---