Disclaimer: This is my first foray into Django. I'm trying to set up a support ticketing system for a small IT department. Initially, I want only to use the auto-generated admin interface. IT staff members will be Django User staff members.
I want to have Ticket items and EndUser items. EndUser items would be users who are "permanent." I also have to deal with temporary users - users who do not warrant a place in ForeignKey drop down box. I want to allow input of basic data (name, e-mail, phone number) for these users. The admin interface should display the name a Ticket is assigned to, either by querying a ForeignKey or by reading a CharField. Coming from PHP, I would do it this way: - Create a bool value to determine perm/temp - If perm, display a drop down menu populated by a users table - If temp, display text boxes - Upon save, save foreign key id of perm users table or temp users table How can I do this in Django? #django had a couple of opinions, which I don't particularly like. 1. Mark fields as optional. I don't like this because there will be lots of null values inserted into the database. I also don't think that this would be following SQL best practices. 2. Write accessor/modifier pages. It was suggested that the admin interface is only for those trusted to input data correctly, and that it should not be used in the manner I have suggested. If I have to write my own interface, then what is the point of the auto-generated one? This seems to goes against the philosophy of Django. If this is the case, it would also seem that the admin interface is so rudimentary that verges on uselessness. It seems like the ideal solution would be to have a parent class (EndUser) that contained the fields to be shared by temp and perm users, then to have a PermUser subclass of EndUser that would contain additional fields. In the Ticket model, you'd then have a ForeignKey that would accept an EndUser or PermUser item (and being that it would accept either, a radio would "magically" appear in the admin interface asking which you'd like to use). From what little I know, neither model inheritance nor "multiple object acceptance" is possible. Any advice would be greatly appreciated. I'm really looking forward to working with Django. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---