Skip to content

Releases: vitalik/django-ninja

1.1.0

07 Dec 22:13
Compare
Choose a tag to compare

What's Changed

New Contributors

Full Changelog: v1.0.1...v1.1.0

1.0.1

17 Nov 10:15
Compare
Choose a tag to compare

Fixed from_orm compatibility

1.0

16 Nov 16:59
7f6b322
Compare
Choose a tag to compare
1.0

Read more details and examples here https://django-ninja.dev/whatsnew_v1/

or watch overview video :

SCR-20231116-qmoj

Overview

  • async authentication fully supported on all layers
  • New parameters markers syntax (+ Annotated[] syntax support)
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
    • schema validators/resolvers now have extra context (like request)
  • Pagination class accepts a request object
  • allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I tried to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

Contributors

@AlTosterino
@AmiZya
@Kristinus
@ddahan
@dipbazz
@ivoire
@lilleswing
@marius-mather
@pavel-beaufort
@pawelngei
@scott-8
@skokado
@vincentdavis
@vpoulailleau
@yasoob

Thank you !

Full Changelog: v0.22.2...v1.0

1.0 RC

07 Nov 16:59
cd66ac8
Compare
Choose a tag to compare
1.0 RC Pre-release
Pre-release

What's Changed

  • Fixed not awaitable response in async authentication (#44)

This looks like the final pre-release - and I'm happy to report that beta versions was successfully tested by multiple companies in production environments

What's new in 1.x

  • async authentication fully supported on all layers
  • New parameters markers syntax (+ Annotated[] syntax support)
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
    • schema validators/resolvers now have extra context (like request)
  • Pagination class accepts a request object
  • allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

Documentation

  • Fix spelling error in motivation documentation by @lilleswing in #874
  • Add partial updates and strict validation to the CRUD tutorial by @ddahan in #877
  • docs: configure syntax coloring by @ivoire in #878
  • docs: use lowercase for language identifier by @ivoire in #879

New Contributors

Full Changelog: v1.0b2...v1.0rc

1.0 beta2

01 Oct 17:55
Compare
Choose a tag to compare
1.0 beta2 Pre-release
Pre-release

Warning: This is a pre-release of Django Ninja V1

This is the last change before 1.x release

This version introduces a new cleaner way to mark requests parameters

f.e.

def some_form(request, data: Form[SomeSchema]):
     ...

instead of

def some_form(request, data: SomeSchema = Form(...)):
     ...

This syntax looks cleaner/short and has the same code completion hints in popular editors.

On the other hand the old syntax is still supported so you can easy port your project to a newer django-ninja version

Bug changes and improvements


What's new in 1.x

  • async authentication fully supported on all layers
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
    • schema validators/resolvers now have extra context (like request)
  • Pagination class accepts a request object
  • Support for Annotated[] syntax
  • allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

New Contributors

Full Changelog: v1.0b1...v1.0b2

1.0 beta1

10 Sep 15:40
Compare
Choose a tag to compare
1.0 beta1 Pre-release
Pre-release

Warning: This is a pre-release of Django Ninja V1

On the other hand this is a beta release, so no more dramatic changes expected - mostly bug fixes

There is only one major syntax thing that I'm still considering to add to 1.0 - shorter annotations - #746 - Please take a look and give your vote/thoughts


What's new

  • async authentication fully supported on all layers
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)
    • schema validators/resolvers now have extra context (like request)
  • Pagination class accepts a request object
  • Support for Annotated[] syntax
  • allow adding routers by string path instead of explicit import

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

Many thanks to contributors

1.0 alpha3

17 Aug 14:51
d5221ae
Compare
Choose a tag to compare
1.0 alpha3 Pre-release
Pre-release

Warning: This is a pre-release of Django Ninja V1

You probably should not use this version in production


What's new v1a3

  • Fixed pydantic context serialisation #825

What's new v1a2

  • Pagination class accepts a request object

What's new v1a1

  • async authentication fully supported on all layers
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

1.0 alpha2

14 Aug 10:41
01fe78e
Compare
Choose a tag to compare
1.0 alpha2 Pre-release
Pre-release

Warning: This is a pre-release of Django Ninja V1

You probably should not use this version in production


What's new v1a2

  • Pagination class accepts a request object

What's new v1a1

  • async authentication fully supported on all layers
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

1.0 alpha1

12 Jul 15:26
e4c10ad
Compare
Choose a tag to compare
1.0 alpha1 Pre-release
Pre-release

Warning: This is a pre-release of Django Ninja V1

You probably should not use this version in production


What's new

  • async authentication fully supported on all layers
  • CSRF is now automatic on Cookie based authentication ( now you should be able to combine multiple cookie/header/etc authenticators and play around with csrf logic)
  • Pydantic2 - which has a core re-written in Rust and includes a lot of improvements and features like:
    • Safer types.
    • Better extensibility.
    • Better performance - so far on few projects that I tested getting average 10% speed improvements (some particular views which do lot of validations should get pretty good bumps)

Unfortunately Django ninja integrates very deep into pydantic core with Schema class, so it is not possible to keep both pydantic v1 and v2 supported - and that is why ninja now bumps to version 1 which might have few deprecations or breaking changes on pydantic level

From Django ninja side I'm trying to make this upgrade as smooth as possible, if you use standard APIs without lot of magic - most likely upgrade should be without any code change

0.22.2

08 Jun 15:42
Compare
Choose a tag to compare
  • Fixed schema generation bug #774