Vitaliy Kucheryaviy
Vitaliy Kucheryaviy
Hi @max-muoto Thank you for contribution Could you fix conflicts with the latest version ?
ok, got it, thanks I guess I'm not the first one :) might be better to add some screenshot to the front page of documentation
@nharrisanalyst @93Deepak change: ```Python def create_clas(request, payload=ClassSchema): ``` to: ```Python def create_clas(request, payload: ClassSchema): ```
Hi @forrestkouakou here is a quick example: ```Python from jose import jwt from ninja.security import HttpBearer class JWT(HttpBearer): def authenticate(self, request, token): try: data = jwt.decode(token, '') return data #...
@forrestkouakou well it's not an easy question without context and business logic.. the most easy way is adopt authenticator with permission logic like this: ```Python class StaffOnlyModify: "Simple permission that...
@Kludex well hard to tell... I'm just comparing docs for v1 and [v2](https://docs.pydantic.dev/dev-v2/usage/types/custom/#creating-custom-classes-using-__get_pydantic_core_schema__) - that does not look like a trivial case: ```Python class PostCodeAnnotation: @classmethod def __get_pydantic_core_schema__( cls, _source_type:...
it's from official docs: - [custom field in v1 ](https://docs.pydantic.dev/1.10/usage/types/#custom-data-types) - [custom field in v2](https://docs.pydantic.dev/dev-v2/usage/types/custom/#creating-custom-classes-using-__get_pydantic_core_schema__)
I think it is not auto solvable problem as in `__get_validators__` you can return all sort of things and have multiple validators which does not look like a case for...
@adriangb > There is a simpler approach for 80% of the use cases: > > ```python > from annotated_types import Predicate # or `pydantic.PlainValidator`, etc. > > PostalCode = Annotated[str,...
> Then we have to carry that metaclass around until V3. And in V3 we'll need a compatibility metaclass for the compatibility metaclass, right? I feel some sarcasm here :)...