django-managers
Manager isn't accessible via model instances
I\'m trying to get model objects inst开发者_如何学运维ance in another one and I raise this error :[详细]
2023-01-19 11:20 分类:问答Managers, model inheritance or what for slicing Users in django?
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[详细]
2023-01-01 18:17 分类:问答Django Managers
I have the following models code : from django.db import models from categories.models import Category class MusicManager(models.Manager):[详细]
2023-01-01 13:12 分类:问答Do Django Models inherit managers? (Mine seem not to)
I have 2 models: class A(Model): 开发者_开发知识库#Some Fields objects = ClassAManager() class B(A):[详细]
2022-12-23 06:44 分类:问答Filtering manager for django model, customized by user
I have a model, smth like this: class Action(models.Model): def can_be_applied(self, user): #whatever return True[详细]
2022-12-22 17:58 分类:问答Django: Model inheriting from base model with custom manager. Can the manager have dynamic variables?
I need to have all my models inherit this manager (Haven\'t tested this manager and it may be ridiculous so I\'m completely open to suggestion/criticism on it as well):[详细]
2022-12-18 06:53 分类:问答Django: How would one organize this big model / manager / design mess?
To sum things up before I get into bad examples, et al: I\'m trying to make an application where I don\'t have to write code in all my models to limit choices to the current logged in account (I\'m no[详细]
2022-12-18 05:44 分类:问答Django: How do you access a model's instance from inside a manager?
class SupercalifragilisticexpialidociousManager(models.Manager): # Sorry, I\'m sick of Foo and Spam for now.[详细]
2022-12-17 07:41 分类:问答Django: Is it a good idea to use an abstract base model in this situation?
class Account(models.Model): identifier = models.CharField(max_length=5) objects = MyCustomManager() class开发者_如何转开发 Meta:[详细]
2022-12-17 07:40 分类:问答How to filter/exclude inactive comments from my annotated Django query?
I\'m using the object_list generic view to quickly list a set of Articles.Each Article has comments attached to it.The query uses an annotation to Count() the number of comments and then order_by() th[详细]
2022-12-13 15:23 分类:问答