Add tests to verify registry of models to django admin
In the last post, we learned how to automate registration of models to the django-admin. In this post, we will try to see how we can add tests to verify that all our models …
Read moreIn the last post, we learned how to automate registration of models to the django-admin. In this post, we will try to see how we can add tests to verify that all our models …
Read moreRegistering models to django-admin
(in general) is not much of a task, but is mostly boring. Many times it might feel like doing a chore. In this post, we'll try to see how we can …
You have a function that takes a lot of time to execute. You need to call that function frequently, at different points in your code with the same arguments. This expensive function seems to be …
Read moreWriting tests for migration can be a bit tricky because all of your migrations are generally run before any of your test. In case you want to test your code for a particular migration, you …
Read moreThis is one of the things I wish I knew earlier. There have been a lot of times, where I needed to constantly monitor the output of a command and all I would do is …
Read moreLet's consider an example where you're returning some info about a Person
object from a function in the form of a tuple.
def info():
...
return name, address, age
Now, in this scenario the receiving …
Read morePhoto by Jessica Lam on Unsplash
In this article I'll share 10 awesome shortcuts for VS Code. These shortcuts are provided by VS Code itself, so you don't have to install any extension for that. …
Read more
In my opinion, one of the most underrated parts in the coding process is testing. Writing automated testing is really important as it ensures all functionalities work as expected. Before you take an automobile …
Read moreWhen I first started working on Django, I used to edit the settings file every time I had to push the code to deployment. Change the value of DEBUG
, read the values for SECURITY_KEY …
To solve any problem in computer science, we define an algorithm, which is - a finite sequence of well-defined, computer-implementable instructions. We've performed basic mathematical and textual operations in Python. But many tasks require decision making …
Read more