Sorry to confuse things, I actually thought putting the shell output would give a bigger picture.
The problem I am trying to solve is getting related to get_absolute_url() >>> photo.get_absolute_url() Traceback (most recent call last): File "<console>", line 1, in ? File "/usr/lib/python2.4/site-packages/django/utils/functional.py", line 55, in _curried return _curried_func(*(args+moreargs), **dict(kwargs, **morekwargs)) File "/usr/lib/python2.4/site-packages/django/db/models/base.py", line 478, in get_absolute_url return settings.ABSOLUTE_URL_OVERRIDES.get('%s.%s' % (opts.app_label, opts.module_name), func)(self, *args, **kwargs) File "/usr/lib/python2.4/site-packages/django/db/models/ __init__.py", line 31, in inner bits = func(*args, **kwargs) File "/var/virtualhosts/picturemexico/photologue/models.py", line 351, in get_absolute_url return ('photo-detail', None, { 'state' : self.photo.place.city.state_slug , 'city' : self.photo.place.city_slug, 'place' : self.photo.place_slug, 'slug': self.slug }) AttributeError: 'RelatedManager' object has no attribute 'place' On Apr 24, 8:59 am, Malcolm Tredinnick <[EMAIL PROTECTED]> wrote: > On Thu, 2008-04-24 at 08:55 -0700, Merrick wrote: > > [...] > > > ***Shell output > > > >>> from photologue.models import * > > >>> photo = Photo.objects.get(slug='golf-course-3') > > >>> photo.place.city.state_slug > > Traceback (most recent call last): > > File "<console>", line 1, in ? > > AttributeError: 'City' object has no attribute 'state_slug' > > This is telling you exactly what the error is. You're accessing a > non-existent attribute on the City model. Maybe you mean to state.slug > instead of state_slug or maybe you mean something else there. In any > case, there is no state_slug attribute. > > Malcolm > > -- > He who laughs last thinks slowest.http://www.pointy-stick.com/blog/ --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---