Petter Friberg

Results 43 issues of Petter Friberg

I'm wondering if it could be possible to support reusing _some_ settings of a `MockRouter` instance, when invoking `__call__`. Basically that'll allow me to specify a `MockRouter` with defaults, and...

enhancement

- Makes attachment of identical routes a noop call - Fixes #436

`install_requires` declares `Django>=2.2`: https://github.com/vitalik/django-ninja/blob/e9f369883f88517a551e304e1ee2e199cad0dd2d/pyproject.toml#L43-L45 Perhaps we should also drop support for `Django < 3.2`? To align with officially supported versions by Django (https://www.djangoproject.com/download/)

**Problem** I have a project where we attach/register routes/urls during `apps.ready`. Which becomes problematic to keep doing when using `django-ninja` while also having test cases calling ```python with django.test.utils.modify_settings(INSTALLED_APPS={"append": ["django-app"]}):...

I've reorganised and extended dynamic manager class generation to support `.as_manager()`. This also renames the dynamically generated manager types to align with what those class names will be during runtime,...

Note: we should probably hold this one off until the latest changes on master has been released to pypi

#### The problem Quite a lot of times I'd like to refine a value that can be accessed with a `SelfAttribute`. This can normally be done by combining it with...

`SelfAttribute` will, if given, call and return the return value of the `coerce` function Closes: #963

Consider the following approach (with `2.11.1`): ```python from django.test import TestCase import factory class UserFactory(factory.django.DjangoModelFactory): username = factory.Sequence(lambda n: 'USER_%03d' % n) password = factory.PostGenerationMethodCall('set_password', 'supersecret') class Meta: model =...

BadMagic
DesignDecision

I have a pydantic model set up like this: ```python class MyModel(pydantic.BaseModel): country_code: CountryCode ``` Then I run a OpenAPI schema validator against the generated schema found here: https://github.com/p1c2u/openapi-spec-validator Getting...