Hi,
I have very strange problem with simple QuerySet.
I get error just on one of servers, and I realy don't know why.
When I use very simple code like:
Model.objects.filter(is_published=True)
I get stupid error:
"Cannot resolve keyword 'is_published' into field. Choices are: id,
is_published, link_to_find, name, reciprocallinks, stype"
Django doesn't see my field 'is_published', but writes that I should
use this filed.
I don't have idea why I get the error just on one of my servers.
### My model start
class ReciprocalLinksGroup(models.Model):
TYPE_OF_SERVICES = (("type1", "type1"),("type2", "type2"))
name = models.CharField(max_length=255, unique=True)
is_published = models.BooleanField(default=True)
stype = models.CharField(max_length = 64, choices =
TYPE_OF_SERVICES)
link_to_find = models.CharField(max_length=128)
class Meta:
db_table = "reciprocal_link_group"
def __unicode__(self):
return u"%s" % (self.group.name)
### My model end
I use it like below:
os.environ["DJANGO_SETTINGS_MODULE"] = "myproject.settings"
from myproject.models import ReciprocalLinksGroup
ReciprocalLinksGroup.objects.filter(is_published=True)
And then I get error.
System:
PLD, Django 1.0.2-2, PostgreSQL 8.3, ModPython, Apache
--~--~---------~--~----~------------~-------~--~----~
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?hl=en
-~----------~----~----~----~------~----~------~--~---