django-orm
Checking another field at the same time as checking a many-to-many relationship
I have a simple-ish ownership design on one of my models. It can be owned by multip开发者_StackOverflow社区le people and current owners can add other people but they have to confirm the invite before[详细]
2023-01-20 06:42 分类:问答Django __in lowercase
I\'m using django-taggit, which handles the attachment of tags to arbitrary content types. I imported a large tag list, which contains many uppercase words, as well as lowercase words.[详细]
2023-01-20 06:27 分类:问答How do I write a Django model with ManyToMany relationsship with self through a Model
I want to have a model with a ManyToMany relationship with itself, I don\'t know how to write this but I\'l try to write some code to illustrate what I want to do.[详细]
2023-01-19 14:19 分类:问答Select DISTINCT individual columns in django?
I\'m curious if there\'s any way to do a query in Django that\'s not a \"SELECT * FROM...\" underneath. I\'m trying to do a \"SELECT DISTINCT columnName FROM ...\" instead.[详细]
2023-01-19 01:29 分类:问答order objects by most unique views (stored in another table with ip) in django
Related models: models.py class Entry(models.Model): ... class EntryView(models.Model): entry = models.ForeignKey(Entry)[详细]
2023-01-18 10:49 分类:问答How to create postgres date index properly?
I\'m using Django ORM and postgresql. ORM creates a query: SELECT (date_part(\'month\', stat_date)) AS \"stat_date\",[详细]
2023-01-12 20:50 分类:问答Elegant way to count frequency and correlation of many-to-many relationships with Django ORM?
I have a Pizza model and a Topping model, with a many-to-many relationship between the two. Can you recommend an elegant way to e开发者_Go百科xtract:[详细]
2023-01-10 20:34 分类:问答django-orm case-insensitive order by
I know, I can run a case insensitive search from DJango ORM. Like, User.objects.filter(first_name__contains=\"jake\")[详细]
2023-01-10 18:29 分类:问答How many rows were deleted?
Is it possible to check how many rows were deleted by a query? queryset = MyModel.object.filter(foo=bar)[详细]
2023-01-09 05:10 分类:问答Django - Selecting related set : how many times does it hit the database?
I took this sample code here : Django ORM: Selecting related set polls = Poll.objects.filter(category=\'foo\')[详细]
2023-01-06 20:54 分类:问答