12 Apr 2019, 01:06

Create Proxy Object in Python
Lets say you have been using a class named ClassA, objects created from that class has been used in many places. Now you have a requirement that you need to make a simillar class ClassB, which has almost simillar functionality. Objects of ClassA and ClassB will have simillar method signatures, and could be swapable.

06 Apr 2019, 01:49

Do Extra in S3 Using Django Storage and Boto3
Today, I am going to write about few useful snippets/functionalities which I have used for Amazon S3 or any S3 compitable storage using Boto3 and Django Storage. FYI, this post focuses on using S3 with Django. So without further ado, lets begin: Configuring S3 When using django storage, you don’t need to put configurations like ~/.

10 Feb 2019, 00:38

Django: Save Unknown Object in Database
Suppose you are dealing with a poorly written API, which returns different type of objects at different scenarios. For example, sometimes it returns a string(ie. abcd), sometimes it returns a list(ie. [1,2,3,4]), or maybe None. Now, you are suppose to save that data, which you can’t predict. As you can’t predict the data type of object, you can’t design your Django Model accordingly.

26 Jan 2019, 14:58

Django: Custom Ordering/Grouping for Model Instances Using Linked List
Linked list is a data structure where each object has points to next. In django, linked list can provide an interesting solution when it comes to custom ordering/grouping issues. Lets think of an example like this: you are making a blog site, and you have made a Post Model like this:

03 Jan 2019, 02:00

Django: Changing User Model in Mid-Project
Every now and then I see some questions pop up in stackoverflow with title: ValueError: Related model ‘app.User’ cannot be resolved This is a very common issue and pops up when the user tries to run the migration. So, lets talk more about what is this problem and how can we solve it.

22 Dec 2018, 02:00

Testing for Django Rest Framework with Factory Boy and Faker
“I’m not a great programmer; I’m just a good programmer with great habits.” ― Kent Beck Test Driven Development - in short TDD is a practice where you write the tests first then the actual code. It makes the code less vulnerable and it makes a testable software rather than writing the software, then test it.

21 Dec 2018, 23:00

Bye Bye Ghost, Hello Hugo
“The Only Thing That Is Constant Is Change -” ― Heraclitus This blog site has changed quite a lot since the begining. I initially developed it as a Django application. It was part of my learning process, and I hosted it in a private shared server. But unfortunatly, good days came to an end, I had to give up that hosting for costing.

12 Oct 2018, 17:25

Control Application Flow from Redux Middleware using React Router 4
While developing application in ReactJs with Redux and React Router 4, what I felt is that, there is no direct relationship between application’s state and routing. We needed to create those connections inside Components. In each component, we needed to check application state and based on that we made decisions where to go next(if needed).

11 Oct 2018, 14:21

Migration From Ghost 1.25.2 to 2.2
This post is no longer valid as I have moved to Hugo :) I have just migrated the site from Ghost 1.25.2 to 2.2. As every growth comes with some inevitable pain, thus you can expect a lot of things are broken. Here all the URLS have been updated.

12 Aug 2018, 16:45

Automated Deployment to Openshift Using Jenkins and Webhook
This blog is the third one of three-parts series regarding CI/CD of Python Application using Gunicorn, NGINX, Jenkins Pipeline to Openshift. In series, we will be explaining: Part One: We will explain about deployment structure and preparations. Part Two: We will write the Jenkins Pipeline. Part Three: Deploy using Jenkins Pipeline to Openshift and Webhook implementation.