I have a model with a decimal field.The output of: def special_method(self): return MyClass.objects.filter(product=self).order_by(\'-date_active\')[0:1]
how do you use model formset in Django? When you do this: from django.forms.models import modelformset_factory
class Ticket(models.Model): \"\"\" An order 开发者_如何学Cplaced by a customer. \"\"\" account = models.ForeignKey(Account)
Say I have a list of photos ordered by creation date, as follows: class Photo(models.Model): title = models.Char()
Wow, I\'m having such a hard time on this. I must be doing something wrong, I\'m getting an incredible ammount of queries.
I\'ve got a ManyToManyField in a user o开发者_开发知识库bject and it\'s used to map the users that user is following. I\'m trying to show a subset list of who they have most recently followed. Is ther
Given the following model, how do I require that atleast one of the two fields has been given a value?
When using Django\'s get_or_create(), when created=True, is th开发者_如何学Goere any way to make it so that it creates an object without saving it to DB?
I\'ve got to keep an inventory of servers and their memory modules & drives.I\'ve created three tables. I want to be able to retrieve all information about the server, including memory and drive i
Here is my setup. I am using Django version 1.1.1 on Dreamhost, Python 2.4. The problem I am having is whenever I create a simple app and also have admin.autodiscover() enabled, Django will throw an e