I'm sure I'm doing this wrong but can't really find an answer in the
docs or by searching.
I have two models (relative to this problem). One is called events,
one is called projects
a portion of models.py for projects looks like this:
from django.db import models
class AlphaEvent(models.Model):
project = models.ForeignKey('projects.Project')
location = models.ForeignKey('projects.Location')
class BetaEvent(models.Model):
alpha_event = models.ForeignKey(AlphaEvent)
I'm not sure if I'm importing the other models incorrectly or
referencing them incorrectly, but something is obviously going wrong.
When trying to add a new BetaEvent I get the following error:
project must be accessed via instance
I'm sure this is very basic python or django, but I'm not sure where
to go. I don't really understand how instances are passed around via
the admin interface so I'm just kind of putting the question out there
rather than searching for the next week.
Thanks for any help!
--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to [email protected]
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
-~----------~----~----~----~------~----~------~--~---