First of all about ContentTypes:
For example in your Page table you have 2 lines.
One is PageText, another PageGallery.
So you have 2 different ContentTypes.

How to determine type of Page:
  p = Page.objects.get(id='main')
  #here we get ContentType object for PageText or PageGallery
  content_type = ContentType.objects.get_by_id(p.contenttype_id)
  #here we get instance of PageText or PageGallery
  instance = content_type.get_object_for_this_type(pk=page.id, ...)
As you see it's pretty simple.

Now about this:
> 1. Add field parent = model.ForeignKey('self', blank=True, null=True)
When you need build Pages tree you must add this field
Tree is something like that
    /main_page/
         /child1/
         /child2/
              /subchild/
But as i under stand you want have something like that:
    /page1/
    /page2/
    /page3/
I if so 'order' field is enough.

--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---

Reply via email to