On 26 March 2010 01:11, Ramiro Morales <cra...@gmail.com> wrote:

> On Thu, Mar 25, 2010 at 9:03 PM, Dries Desmet <dr...@urga.be> wrote:
> > My models are:
> >
> > ----
> > class Album(models.Model):
> >     slug = models.SlugField(
> >         unique=True,
> >         help_text=_("Suggested value automatically generated from title.
> > Must be unique.")
> >         )
> >     # using name of the model, rather than the model object itself,
> >     # because Photo is not yet defined.
> >     cover_image = models.ForeignKey('Photo', blank=True, null=True)
> >
> > class Image(models.Model):
> >     album = models.ForeignKey('Album', related_name='images')
> >     image =
> > ImageWithThumbnailsField(upload_to='upload/mygallery/images/%Y/%m/%d/',
> >                                      thumbnail={'size':
> > settings.MYGALLERY_THUMBNAILSIZE})
> > ---
> > But doing python manage.py syncdb states:
> > "mygallery.album: 'cover_image' has a relation with model Photo, which
> has
> > either not been installed or is abstract."
> >
> > As stated in the django model reference, I'm already using the Foreignkey
> > field with a name (string) rather than the model itself. I'm using
> > Postgresql. What am I missing? Are 2 models not allowed to point to each
> > other?
>
> Re-read the error message, it is correctly pointing the problem.
>
> You don't seem to have any model called Photo, at least no
> in the code you included in you email.
>
> --
> Ramiro Morales  |  http://rmorales.net
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To post to this group, send email to django-us...@googlegroups.com.
> To unsubscribe from this group, send email to
> django-users+unsubscr...@googlegroups.com<django-users%2bunsubscr...@googlegroups.com>
> .
> For more options, visit this group at
> http://groups.google.com/group/django-users?hl=en.
>
>
OMG, thank you Ramiro. I had changed Photo to Image because I thought it was
going to be more appropriate. This one slipped through. Thank you so much
for extra pair of eyes, although I have to admit, mine were very muddy
today.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-us...@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