from shcbelpa.season.models import Game
This is the line of code that generates the error right? 
Is myapp = shcbelpa ?


On Fri, 2009-10-09 at 10:39 +0200, Christian Wittwer wrote:
> Hi,
> I have a strange problem with importing models from an other app.
> 
> /myapp/season/models.py
> ---------------------------------------------------------------------------------------------------------------------------------------
> from myapp.team.models import Player
> 
> class Game(models.Model):
>     date_time = models.DateTimeField()
> 
> class Goal(models.Model):
>     goal_scorer =
> models.ForeignKey(Player,related_name='goal_scorer',blank=True,null=True)
> ---------------------------------------------------------------------------------------------------------------------------------------
> Importing Player from the app team works fine.
> 
> /myapp/team/models.py
> ---------------------------------------------------------------------------------------------------------------------------------------
> from shcbelpa.season.models import Game
> 
> class Player(models.Model):
>     lastname = models.CharField(max_length=60)
> ---------------------------------------------------------------------------------------------------------------------------------------
> 
> Importing Game from the app team does not work.
> 
> "ViewDoesNotExist: Could not import myapp.season.views. Error was:
> cannot import name Game"
> 
> The view exists and works. As far as I comment out the import of game,
> all works fine!
> In general, every import of models from myapp.season does not work.
> 
> Why does the import just works in one direction?
> 
> Cheers,
> Chris
> 
> > 


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

Reply via email to