"Making a blog using django" is probably the most made tutorial of Django. This post is no different. But I made this in my own way using some of django's built-in features so that less coding is required and making it more understandable with minimum packages to use.
Django Tables2 is a package which displays table directly from queryset. It shows column header based on object's attribute name. But if someone wants to override it, how can he/she do that? Here is a easy solution. Suppose we have a model class like this: class SomeModel(models.Model)
Here I am going to write a dynamic filter. This filter is made for python 3. It will take query or model class and filter condition as input, It will return filtered query based on those filter condition. This is constructed using this SO answer. Function: class DynamicFilter(ModelHelper): def
I am going to share some useful Django tools/functions which are very useful(were for me atleast) to get things done. Return any model class and its properties This method will return any model class if you have the name of the class. from django.db import models def
Django has its own implementation for reset/forgot password for its admin site. We are going to use that piece of code as reference to implement similar feature for a non admin-site authentication page. Although there are tons of good packages which will allow user to use their password reseting