Abhishek Sharma

Abhishek Sharma

Press Enter/Return to start Search

November 17, 2019November 17, 2019

Add custom actions to soft delete records in django admin

Django admin provides some default actions to perform in bulk in list view. You can add a custom...

Discover
November 17, 2019November 17, 2019

Remove bulk delete action from django admin

Django admin provides multiple options in list view like delete records in bulk. See the image below for your...

Discover
September 28, 2019

Set environments in django

Setting up environments in django is quite easy. You need to install “django-configurations” module to add multiple environments....

Discover
September 22, 2019

Raw query data/result to dictionary or grouped result set – Django

Many times we need to execute raw query instead of using built-in ORM. In this case it will...

Discover
September 19, 2019September 19, 2019

Add/subtract week, month, year to current date in python/django

You can add weeks, months and years to current date using dateutil.relativedelta module. As shown below, using dateutil.relativedelta...

Discover
September 19, 2019September 19, 2019

add/subtract timedelta to current or specific time – python/django

Sometimes it is required to add/subtract an amount of time to current or any specific time. We can...

Discover
September 13, 2019

Single quoted string to dictionary

Json.loads(string) expects double quoted string as parameter. If you have a string with single quotes, and try to...

Discover
September 13, 2019

Sort dictionary by value

Sorting the recordset is very basic and frequently used requirement. Let’s assume that you have a dictionary as...

Discover
August 26, 2019

Create response middleware in django

A response middleware is called just before returning the response to the client. If you want to modify...

Discover
August 23, 2019

Create custom object manager in django admin

In django, generally you can query on a model like: Products.objects.all() Or if you want to apply a...

Discover

Posts navigation

Page 1 Page 2 Page 3 Page 4 Next
Copyright © 2019 Abhishek Sharma. All rights reserved. | Designed by Precise Themes
Back to Top