I used startproject to create a project called 'ens'. I used startapp to create an app called 'blog' which has its own model.py and views.py.
I syncdb'd and the tables are created. There's a blog_tag and blog_article etc.
My views.py has for example:
from models import Tag, Node, Comment, UserProfile
"""Main blogs listing."""
tags = Tag.objects.all()
return render_to_response("blog/index.html", dict(tags=tags, user=request.user))
I do in fact, have a tag through admin panel. So everything is fine.
However, when I go to this view url, I get
relation "ens\_tag" does not exist
LINE 1: ...", "ens\_tag"."title", "ens\_tag"."description" FROM "ens\_tag"
Why is it looking for ens_tag, it should be blog_tag---how do you fix this???
I also tried:
from ens.models import Tag, Node, Comment, UserProfile
from ens.blog.models import Tag, Node, Comment, UserProfile
from blog.models import Tag, Node, Comment, UserProfile
Jul 27 '12 at 01:14