hi,
i am using this set of models:
# -*- encoding: utf-8 -*-
from django.db import models
from django.contrib.auth.models import User
from myproject.tagging.models import Tag
class Blog(models.Model):
topic = models.CharField(maxlength=120)
tags = models.ManyToManyField(Tag)
class Admin:
pass
#-----models.py in myproject.tagging----------------
from django.db import models
class Tag(models.Model):
name = models.CharField()
def __str__(self):
return self.name
class Admin:
pass
after feeding my (sqlite) database with some data, i tried:
>>> from myproject.tagging.models import Tag
>>> t = Tag.objects.all()[0]
>>> t.blog_set.all()
[ here i get an error about unkown attribute/method 'blog_set' ]
dir(t) doesn't reveal any method that points back to my Blog class.
i was discussing that on irc (derelm @
http://simon.bofh.ms/logger/django/2006/05/15/10/25/) but ended
clueless as to why it doesn't work.
I am using latest svn - that's revision 2908 right now.
Can someone help or point me to any simple mistake i might have
overseen?
thanks in advance
derelm
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---