That doesn't change the advise
I would find it weird to import a class only to have something else loaded
https://www.python.org/dev/peps/pep-0020/
"Explicit is better than implicit."
On Wed, Dec 28, 2016 at 3:02 PM, Guilherme Leal wrote:
> Got it.
>
> The custom model doesn't have any signi
Got it.
The custom model doesn't have any significantly different behaviour, just
some helper properties that return, for instance, a basic GrapQL Node from
that very model (the project uses graphene).
2016-12-28 15:46 GMT-02:00 Avraham Serour :
> You could monkeypatch django to accomplish this,
You could monkeypatch django to accomplish this, but I would advise against
it.
Instead of having implicit or hidden behaviour you should instruct your
developers to use from myproject import models instead of from django.db
import models
On Wed, Dec 28, 2016 at 7:13 PM, Guilherme Leal wrote:
In one of my django projects, I have a base model (that inherits
from django.db.models.Model), and is the base model class that all my
models uses.
I would like to "override" the base model class from django, so everytime a
developer would import the base model class with "from
django.db.models
4 matches
Mail list logo