I tried a number of ways, but still failed to get where I needed. I've created my own control panel now.
On Mar 27, 1:18 pm, andybak <andy...@gmail.com> wrote: > Did the proxy table solution that Alex suggested work out for you? > > That's the one I try just as soon as I upgrade to trunk (some of the > admin template changes in trunk breaks my admin template overrides so > I might hold off for the 1.1 release in case it changes some more) > > On Mar 24, 2:53 pm, Dan Ward <danieljw...@gmail.com> wrote: > > > OK, > > > I've done a fair amount of research and I want to detail what I'm > > aiming to achieve. > > > I have a page table. The page table contains various fields, which are > > dependent upon the pgtype option (containing three possible values). > > > What I want to achieve is three separate pages in the admin site, > > which show only their specified pgtype's options. Each admin page > > should appear as it's own Model, seemly unrelated. > > > When visiting a 'Video' page, for example from the admin site, it > > should only list the video pages from the pages table. When adding a > > new item, it should only show only relevant 'Video' fields. This > > should also be the case for 'Message' and 'Website' pages (the other > > two pgtype values). > > > I really don't want to start going down the route of model redesign to > > have separate tables. Especially as the database is already in use. > > > Thanks. > > > On Mar 24, 11:57 am, Dan Ward <danieljw...@gmail.com> wrote: > > > > To follow up, > > > > I can see how I can achieve different forms, however I can't figure > > > out how to provide three separate links in the admin index page. > > > > Any suggestions? > > > > On Mar 22, 11:22 am, Dan Ward <danieljw...@gmail.com> wrote: > > > > > Hi, > > > > > First of all thanks for the replies. I won't be able to try anything > > > > until tomorrow, however it has given some food for thought. > > > > > Malcom, the three admin entries is what I'm looking for. Essentially, > > > > I'm aiming to have the admin home page display the pages block as so: > > > > > Pages (admin group) > > > > -- Rotation (rotation model) > > > > -- Web Page (page model) > > > > -- Video Page (page model) > > > > -- Message Page (page model) > > > > > The rotation page really doesn't matter. I'll look in to improvements > > > > at a later stage, however the focus is on having three separate admin > > > > forms for a single model. Really, looking back on it, it would have > > > > been better in multiple models, but that's besides the point, I don't > > > > have the time to go back on what I've done there. > > > > > I hope this clears things up a bit. > > > > > On 21 Mar, 22:04, Malcolm Tredinnick <malc...@pointy-stick.com> wrote: > > > > > > On Sat, 2009-03-21 at 18:01 -0400, Alex Gaynor wrote: > > > > > > [...] > > > > > > > In the development version there's actually a more clever solution > > > > > > to > > > > > > this. You can create pure python subclasses(proxy classes) that use > > > > > > the same DB table and fields and everything, but have their own > > > > > > class. > > > > > > So you could create the relevant proxy models, and register the > > > > > > ModelAdmins for each one of these proxy models. > > > > > > Only if the original poster wants three separate admin entries on the > > > > > index page. It depends on the requirements, which hopefully the > > > > > original > > > > > poster will explain. > > > > > > 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 django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---