django-stubs
django-stubs copied to clipboard
PEP-484 stubs for Django
# Bug report ## What's wrong Cannot use the class returned from inlineformset_factory as a baseclase for creating another class, failing test: ``` - case: inlineformset_factory_extended main: | from typing...
# Bug report ## What's wrong Having recently updated mypy and django-stubs, the following error started occurring: ```shell error: Missing type parameters for generic type "BaseFormSet" [type-arg] ``` This was...
`django.template.backends.django` is missing a definition of its `Template` class.
# Bug report I'm overwritting the user manager like: ```python class MyUserManager(BaseUserManager): def create_user( self, facebook_email: str, facebook_first_name: str, facebook_last_name: str, facebook_uid: str, facebook_access_token: str, **extra_fields ): ..... class User(AbstractBaseUser):...
# Bug report mypy crashes when reaching code with Django queries that annotate fields, which did not happen which django-stubs version 1.8.0. ## What's wrong ``` viewer/models.py:951: error: INTERNAL ERROR...
https://github.com/typeddjango/django-stubs/blob/8d8b8cd1fc8b54eac799905dbbffc4e21708b6da/django-stubs/contrib/sitemaps/__init__.pyi#L24 The item shouldn't just be Model. As you can see it can also just be a string too if creating a sitemap of pages that aren't in models: ````python...
# Bug report ## What's wrong When I create a custom `QuerySet` subclass, mypy raises the following error: `app.models.py:59: Unexpected keyword argument "name" for "filter" of "ItemManager"` My code looks...
# Bug report ## What's wrong The typing of a ManyToMany relation's `add()` method incorrectly assumes that model ids are int, but they can be other types, such as UUID....
# Bug report ## What's wrong I am trying to setup my Django app project with `Tox`, `mypy` and `django-stubs` using the settings from `tests.settings`. My package dir structure is...
# Bug report ## What's wrong An example of a `CreateView` looks like this (from the Django docs) ```python from django.views.generic.edit import CreateView from myapp.models import Author class AuthorCreateView(CreateView): model...