django-stubs Questions
2
Let's say I have the following Django models:
class Toolbox(models.Model):
name = models.CharField(max_length=255)
tools = models.ManyToManyField("Tool")
class Tool(models.Model):
cla...
Move asked 4/12, 2021 at 22:12
1
mypy django rest framework - Unsupported left operand type when multiple permission classes are used
I am integrating mypy on a existing codebase(using django, drf frameworks).
Sample code in view.py:
from rest_framework.permissions import IsAdminUser, IsAuthenticatedOrReadOnly
@api_view()
@per...
Wellman asked 3/12, 2019 at 13:50
2
I have an existing Django project which uses a custom User model class that extends AbstractUser. For various important reasons, we need to redefine the email field as follows:
class User(AbstractU...
Wonderland asked 24/11, 2023 at 17:21
2
Let's say we have the following models:
class Site(models.Model):
# This is djangos build-in Site Model
pass
class Organization(models.Model):
site = models.OneToOneField(Site)
And if I use th...
Fecteau asked 24/8, 2022 at 7:9
0
I try to configurate start mypy + django-stubs cheking before commiting. I use pre-commit for it.
When I try to commit, I have error django.core.exceptions.ImproperlyConfigured: Set the POSTGRES_DB...
Chemo asked 1/3, 2022 at 5:10
1
© 2022 - 2024 — McMap. All rights reserved.