That was it! After running: ./manage.py sqlclear foo | ./manage.py dbshell && ./manage.py syncdb
it works! So something in my db was inconsistent! Thanks! Op 18-nov-2010, om 09:57 heeft Marc Aymerich het volgende geschreven: > On Thu, Nov 18, 2010 at 12:00 AM, Jonas Geiregat <jo...@geiregat.org> wrote: >> >> Op 17-nov-2010, om 23:46 heeft Marc Aymerich het volgende geschreven: >> >>>>>> GenericPost.objects.get(pk=1).content_object.content >> >> >> That's the strange thing. It just doesn't work: >> >> Some code: >> >> >> In [3]: GenericPost.objects.get(pk=1).content_object >> >> In [4]: GenericPost.objects.get(pk=1).content_object.content >> --------------------------------------------------------------------------- >> AttributeError Traceback (most recent call last) >> >> /Users/Jonas/Webdesign/genericv/<ipython console> in <module>() >> >> AttributeError: 'NoneType' object has no attribute 'content' >> > > > Yep, that is very strange!. I promise that I've try exactly the same > code that you post here and it works well with my django installation. > I use the devel version with python 2.6.6 and mysql backend. > > Try to drop your database and create a new one. Maybe you have some > kind of inconsistency there. > > -- > Marc > > -- > 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. > Met vriendelijke groeten, Jonas Geiregat jo...@geiregat.org -- 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.