title = meta.OneToOneField(Title, core=True) ... # works but nothing displays should be
#installs and doesn't complain but no sub fields display # AND I feel this is due to the fact that the ill formed SQL query string in the next example isn't executed [EMAIL PROTECTED] wrote: > Hi All, > > Been having problems solving a model problem and it may or may not be > due to Django shortcomings. I would like to have multiple > objects(/models/classes) where one is a 'master' or generic object and > all others are one to one mappings to this master. From this I would > like to selectively edit the submodels inline (eg edit_inline = > meta.STACKED) based on user's group. > > The actual model code is: > > ... > title = meta.OneToOneField(Title, core=True) > ... > # works but nothing displays > > > ... > title = meta.OneToOneField(Title, edit_inline=meta.STACKED, core=True) > ... > # installs but incorrect SQL query string when trying to see an item > after it has been added > # --- Exception Value: (1054, "Unknown column > 'testtitles_tlftitles.id' in 'field list'") > # testtitles is the app, Title is the master model, Tlftitle is the > child model that has the OneToOne mapping. > # The `id` column does exist in the parent but not the child model. > > > Having seen this ticket http://code.djangoproject.com/ticket/1340 maybe > it is not yet available or complete? If there is currently a way to do > it or even a better way (or even a workaround [ForeignKey?]) can > someone please steer me towards it? > > The model seems to install (python manage.py install app) fine, no > complaints. But the built in admin seems to build the wrong SQL query > string when trying to actually display the child models. > > Any help appreciated! > > cheers, > Peter --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---