Hi there 👋

I’m a software engineer and a blogger. I write about programming, technology, and life.

Docker & Dockerfile

It is an open-source project that automates the deployment of software applications inside containers by providing an additional layer of abstraction and automations of OS level virtualization on Linux. In simple words, Docker is a tool for running your applications inside containers. Container package all the dependencies and code your app needs to run into a single file, which will run the same way on any machine. Terminologies Docker Container A container is a standard unit of software that packages up code and all its dependencies, so the application runs quickly and reliably from one computing environment to another....

May 14, 2022 · 7 min · Arjun Adhikari

Django - Model Anti Patterns

Hello pals, While working with Django, we all write code that does the job, but some code may be performing excessive computations or operations that we are unaware of. These operations may be ineffective and/or counterproductive in practice. Here, I am going to mention some anti-patterns in Django models. Using len(queryset) instead of queryset.count() The queryset in Django are lazily evaluated which means that records in database aren’t read from database until we interact with the data....

May 2, 2021 · 5 min · Arjun Adhikari

Django - Enhance Admin Interface

Hello Geeks, First of all, I would like to thank you for reaching here. No doubt you’re gonna be a successful Django developer ahead. Introduction In this blog, I am guiding to integrate django-jazzmin theme to the Django project. According to their documentation : Django Jazzmin is intended as a drop-in app to jazz up your Django admin site, with plenty of things you can easily customise, including a built-in UI customizer....

Mar 30, 2021 · 5 min · Arjun Adhikari

Django - Implement Autocompletion

Hello pals, In this blog, I am going to guide you to implement autocomplete in Django admin interface. I chose admin interface because it provides CRUD ( CREATE-READ-UPDATE-DELETE ) view for defined models out of the box. For implementing auto completion feature, I am going to use django-ajax-selects currently maintained by crucialfelix. Setup Let’s start by creating a django project. First of all, I’ll create a virtual environment .venv. You can create virtual environment just by python -m venv ....

Mar 26, 2021 · 4 min · Arjun Adhikari

Django - Luck Guesser App

The steps are: Create a directory. mkdir '$MY_DIR_NAME'. Navigate to that directory. cd $MY_DIR_NAME. Setup a virtual environment inside the directory. python -m venv .env Here, .env is name of virtual environment. You can name it as you like. But I started with period . so it gets listed at top in explorer view of IDEs and makes easier to explore through project files....

Mar 18, 2021 · 4 min · Arjun Adhikari

Django - Create App and Migrations

Hello pals, I hope you’re following me through the first installment of the series ‘Create Django Project’. Upto then, I’ve created a django project named weather_project. Project & Apps : What’s the fuss ? The typical next step is to start adding apps, which represent discrete areas of functionality. A single Django project can support multiple apps. So, I am creating an app inside the Django project for managing my application logic conveniently....

Mar 15, 2021 · 4 min · Arjun Adhikari

Django - Create Project

Hello pals, In this blog tutorial, I am guiding you to create a Django web application from stratch. Setup Virtual Environment Like every other Python Developers, we start a project by creating a virtual environment at first. A virtual environment is a tool that helps to keep dependencies required by different projects separate by creating isolated python virtual environments for them. So, create a virtual environment on your system. If you don’t have it installed, install from PyPi: pip install virtualenv...

Mar 6, 2021 · 3 min · Arjun Adhikari

Apache - Locally Host Website

Hello friends, In this tutorial I’m guiding you how to host a simple website in Apache Web Server in Linux. So, let’s get started. Install Apache First, let’s install Apache from the apt repository in Linux. Enter the following command on your terminal to install the Apache web server: sudo apt install apache2 After successful installation, here are some commands that may come handy while running Apache web server. To start Apache 2, run:...

Jan 5, 2021 · 2 min · Arjun Adhikari

Python - Reverse String

Introduction A word, number, phrase or a set of characters that read the same backwards as they do forward is known as a Palindrome. When its digits are reversed, they turn out to be the exact same number as the original number. For example: MADAM, 1234321. Being focused on digits (integer), here we will be analyzing some of the methods to check if a number is palindrome or not by reversing the provided number....

Jan 3, 2021 · 7 min · Arjun Adhikari

Git - Download specific folder only from GitHub

Download required folder only from GitHub Hello pals, We all have experienced a situation where we need to download a folder from GitHub but we are forced to clone a whole bulky repository and then access the required folder. Well, no more reason to fear to worry of these situations. Through this blog tutorial I’m going to guide you to download only the required folder from GitHub without cloning the whole repository....

Feb 4, 2020 · 2 min · Arjun Adhikari