This is a bit of a tricky one but I need help solving the following
error:

ImportError: cannot import name Container

I'm sure it has something to do with the unusual relationships I have
between two models. I'll put a simplified version below.

It started when I added the 'image' field to the container model.

*** media/models.py ***

from django.db import models, transaction, IntegrityError
from django.contrib.auth.models import User
from myproject.containers.models import Container
import tempfile

class Image(models.Model):
        title = models.CharField('title', max_length=255)
        image = models.ImageField(upload_to='uploads/images')
        caption = models.TextField(blank=True)
        profiles = models.ManyToManyField(Container, limit_choices_to =
{'container_type__url': 'profiles'}, related_name='image_profiles',
blank=True)

*** end ***

*** containers/models.py ***

from django.db import models
from django.contrib.auth.models import User
from myproject.media.models import Image

class Container(models.Model):
        title = models.CharField(max_length=255)
        url = models.CharField(max_length=64)
        image = models.ForeignKey(Image, blank=True, null=True,
related_name='profile_image')
        description = models.CharField(max_length=255, blank=True)
        user = models.ForeignKey(User, null=True, blank=True)

*** end ***

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

Reply via email to