django-models
Django QuerySets - with a class method
Below is a stripped down model and associated method.I am looking for a simple way upon executing a query to get all of the needed information in a single answer without having to re-query everything.[详细]
2023-04-08 08:18 分类:问答Django planmember_set issue
I have a question that I hope someone can help me with.I\'m using a form to have the user select a \"plan\".Now I want to list all the members in the plan, in the form.I have a function \'get_owners\'[详细]
2023-04-08 03:34 分类:问答django: use QuerySet.values() to return Python types?
I\'ve got a custom Field which convert开发者_C百科s the value to/from a Python type: class MyField(models.Field):[详细]
2023-04-08 02:52 分类:问答django filter depeding on character count of the item
I have two models such that class Employer(models.Model): code = models.CharField(null=False,blank=False,default=\"\")[详细]
2023-04-08 02:38 分类:问答Django get all related Choices where Event=Event.id
I\'m trying to create my first application using Django. I\'m using the following code to create a list of events.[详细]
2023-04-08 02:03 分类:问答ManyToManyField Relationships Between Multiple Models
I have the following models that represent books and authors.A single book can have multiple authors and an author could have written multiple books.So I am using Django\'s ManyToManyField type to lin[详细]
2023-04-08 01:02 分类:问答django model filter question
I have a model which I need to filter based on different conditions. I want to avoid having to write complicated nested conditions and fitting a model filter onto every situation.[详细]
2023-04-07 16:33 分类:问答Add other object and receive error MultiValueDictKeyError (Django admin)
I have a relationship follow as: class Question(models.Model): qid = models.PositiveIntegerField(primary_key=True)[详细]
2023-04-07 14:59 分类:问答django one-to-one relationship defaulting to existing object - is this what is supposed to happen?
I have three models, related with one-to-one relationships. So far as relevant, the code for them is:[详细]
2023-04-07 10:51 分类:问答django save data in database only when certain conditions are met
I have a python function that scrapes some data from a few di开发者_StackOverflow社区fferent websites and I want to save that data into my database only if a certain condition is met.Namely, the scrap[详细]
2023-04-07 07:24 分类:问答