Articles under the category
Add tests to verify registry of models to django admin

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 more
Automating registry of django models to the admin

Automating registry of django models to the admin

Registering 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 …

  Read more
Caching expensive operations in python

Caching expensive operations in python

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 more
Writing unit tests for migrations  in django

Writing unit tests for migrations in django

Writing 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 more
Using watch to monitor output change for a command

Using watch to monitor output change for a command

This 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 more
Use named tuples to stop yourself from remembering order of tuples

Use named tuples to stop yourself from remembering order of tuples

Let'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 more
10 Awesome VS Code shortcuts for Linux

10 Awesome VS Code shortcuts for Linux

Photo 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
Unit Testing and Why is it Important

Unit Testing and Why is it Important

 

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 more
Separate your development and production settings for a django project

Separate your development and production settings for a django project

When 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 …

  Read more
Conditional Statements in Python

Conditional Statements in Python

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