Every now and again, I need to generate a Django secret key. And I always forget what is the function I have to call, and I end up looking it up every time.
April 9, 2023 | Tags: django django-rest-framework
In the list endpoints of a REST API, you usually send a list of objects. However, in the Django REST framework and, in particular, when using viewsets, the
list method does return a list. But oftentimes it's very useful to return an object that has a key that contains that list. Why? Because you can send additional data, such as pagination, for example, without having to make breaking changes, among other things.
Today, I released Django Interactive Models!
Aug. 29, 2022 | Tags: python django open source
Few months ago, on this very website, I implemented a very simple analytics tool to check how many people went into my website. A few days ago, I decided to move this out of my website and into its own separate package.
So, I basically messed up my own website! (Fortunately, it was just that).
It is really easy. The gist of it is adding a view that will serve the file and some cache to not have to send it every time and that is pretty much it.
For a while I have been wanting to have a blog to be able to share things I learn during my webdev journey. Creating a website and deploying it was one of the first steps in that direction back in 2019, before I joined Red Points. It was a very simple (well, still is) flask website with jinja2 templates and some data passed for the urls and so on. After I learned Django at Shalion, I decided to move from Flask to Django to have more capabilities moving forward and since I really like Django it was a perfect way to be able to have a small project to test packages and so on.