On Jan 7, 2008 7:59 AM, shabda <[EMAIL PROTECTED]> wrote: > This line gives me an error, > revision_for = models.ForeignKey(Page, related_name = 'revision_for') > as NameError: name 'Page' is not defined, obviously because page is > defined later in the file. I can not put PageRevision later as Page > class refers to that. How can I acieve this?
You'll want to read the documentation, which explains how to do this: http://www.djangoproject.com/documentation/model-api/#many-to-one-relationships -- "Bureaucrat Conrad, you are technically correct -- the best kind of correct." --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---