Here's a generic response for object creation with django-ninja:
class GenericCreatedSchema(Schema, Generic[EmbeddedType]):
success: bool
created_object: EmbeddedType
= use the same generic response template for ALL object creation endpoints.
But even better: I can use different response types in the same API endpoint, using HTTP status codes - depending on which fields are exposed to the user.
All of this translates to OpenAPI spec automatically 💯
Oy! Today, it's the 10 year anniversary for #Django PR#2692 🥳
It's definitely worth celebrating how the good forces were victorious against all the loud mouth conservatives/trolls. Since my office is full today, I might need to get both a primary cake and a replica cake for redundancy 🍰
Congrats and thanks to @fcurella and everyone else involved in this.
Early AM, we begin to work on the Django framwork via Python. I've feared the framework for a while, but today I am going to handle it. Never let the programming lang handle me. lol.
I finally got around to upgrading my main project from Django 4.2 to Django 5.
I allocated several hours this evening for the arduous process of making sure I got everything right, and before I got started I figured I'd give django-upgrade (by @adamchainz) a try this time around.
No more than 15 minutes later my project was running on Django 5, tested good, and pushed to production.
Wait, what?!?! 😲
Super impressed with how easy django-upgrade made it ❤️
After an 8-year break from web development, I evaluated modern tech stacks to build my personal projects in 2024. This post chronicles my journey in selecting the perfect combination of backend, frontend, database, and hosting.
I have a custom django model field in an installable standalone app.
This app has a migration file that creates a new composite type in a postgres db (if it doesn't already exist). Users installing the app shouldn't have to manually run this migration.
Anyone know how I tell django's migrations autodetector that if another app's model uses my custom model field and we generate migrations model, it needs to add a dependency to the migration associated with the custom field? 🤔
Enormous news! the Python Software Foundation now has a 5 year commitment with Fastly to deliver @pypi, us.pycon.org, and much more. We appreciate you and your continued investment in the #python community, Fastly! #PyConUS
I’m helping a client upgrade to django-import-export v4, and I gotta say I’m enjoying the clarity of the release notes. Every breaking change spelled out, with PR links. Thank you Matt :)