Hi guys! I have a project to publish accounting offices on the internet. All the accounting offices will have usefull tools avaiable on a centralized page and each office will have a specific homepage built from database information. My simplified model structure is:
class Office(Model): name = CharField(maxlength=200) def host_name(self): return self.site.host_name class Admin: list_display = ['host_name'] class Site(Model): office = OneToOneField(Office, edit_in_line=STACKED, num_in_admin=1) host_name = CharField(maxlength=64, unique=True) some_data = CharField(editable=False, ...) some_another_data = CharField(editable=False,...) logo = ImageField(editable=False,...) I can only create I site inline in the Office administration page, this is what I wanted, but I want the site to be required, is there a way to make a inline element be required on the parent object creation? Another question: I think it's easy to my users to read the host_name of each Office reather than his name (in the administration page). This was possible using list_display but is there a way to order offices by host_name (maybe working with joins) and is there a way to filter by host_name? Thanks in advance, best regards! -- Michel Thadeu Sabchuk Curitiba - ParanĂ¡ - Brasil --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---