django-1.5

Django QuerySet with Models

Django QuerySet with Models Question: I’m new to Django and trying to understand how to use querysets with models. Model class Channel(models.Model): name = models.CharField(max_length=200) accountid = models.CharField(max_length=34) def get_channel_list(self): return self.get_queryset().name() What I want to do is return the entire name column as an array if account id matches. I’d like to use a …

Total answers: 3

AttributeError: 'Manager' object has no attribute 'get_by_natural_key' error in Django?

AttributeError: 'Manager' object has no attribute 'get_by_natural_key' error in Django? Question: I am using Django ‘1.5c1’. I have this line in my settings.py: AUTH_USER_MODEL = ‘fileupload.galaxyuser’ Here’s my Galaxyuser model: class GalaxyUser(models.Model): id = models.IntegerField(primary_key=True) create_time = models.DateTimeField(null=True, blank=True) update_time = models.DateTimeField(null=True, blank=True) email = models.CharField(max_length=765) password = models.CharField(max_length=120) external = models.IntegerField(null=True, blank=True) deleted = …

Total answers: 4