I have a field in a model that I want users to feel like they can write an arbitrary amount of text in. Django provides a CharField and a TextField in the models. I assume that the difference is that
Say I have a model like: from django.db import models USER_TYPE_CHOICES = ( (1, \'Free\'), (2, \'Paid\'),
I\'m not sure if I just can\'t concentrate or what, but I feel like this should be easy to do. I have 2 models, one that references the other as a simple foreign key relation (one-to-many) now in the
A couple of times I\'ve run into a situation, when at save time I need to know which model fields are going to be updated and act accordingly.
I have these models in Django: class Customer(models.Model): def __unicode__(self): return self.name name = models.CharField(max_length=200)
I\'m trying to filter a table in Django based on the value of a particular field of a ForeignKey. For example, I have two models:
I defined a unicode() method in my Contact model. def __unicode__(self): return u\'%s %s\' % (self.first_name, self.last_name)
Lets say I have two django apps: competitions - which will handle competition data entries - which will handle functionality relating to entering competitors into competitions
I have a problem with deleting my objects. I wrote a delete method which get a list of IDs of objects to be deleted. This works fine for objects and for objects with foreign keys, but it fails if i ha
I want to build an undirected graph in Django.I have built an edge model with two foreign keys (first,second) to the node class, but there is a conflict with the related_name.I can use first_set and s