this_category = Category.objects.get(name=cat_name) gives error: get() takes exactly 2 non-keyword arguments (1 given)
I\'m writing a Project in Django where I\'ve 5 kind of groups of Users: Group1 Group2 ... Then I\'ve a Model, Item which has many relation with users, the Item has one Owner (a User in Group1), a
My models are set up as follows (this is an example and not my actual models) class modelA(Model): field1 = CharField(max_len开发者_Python百科gth=50)
I have the following models code : from django.db import models from categories.models import Category class MusicManager(models.Manager):
I need order a Queryset by date in desc order, but i need put in the end the objects at the end, I do this:
Can I add other tables in the database c开发者_高级运维reated by django ? It is for my PHP application.If you are asking if you can put tables for your PHP application into your django database schema
Lets say that we are getting POSTed a form like this in Django: rate=10 items= [23,12,31,52,83,34] The items are primary keys of an Item model. I have a bunch of business logic that will run and cr
I have this simple Post model: class Post(models.Model): title = models.CharField(_(\'title\'), max_length=60, blank=True, null=True)
I\'m writing a test \"grade book\" application. The models.py file is shown below. class Student(models.Model):
Suppose, I want to record say poll choices by users everyday. In this case, i have a table named vote which has columns poll , choice and user-id . So how can i out the constraint (maybe in the django