Home Authors Posts by Alex Robert

Alex Robert


Customize 404 Error Page in Django?

The default error views in Django should suffice for most Web applications, but can easily be overridden if you need any custom...

Display Image in a Django Template

Follow this steps to load an image on your Django Template: MEDIA_ROOT = os.path.join(BASE_DIR, 'media') MEDIA_URL = '/media/'

How to work with DataURI in Django Image Upload?

Here is the code...use this code in your models.py file import os from datauri import DataURI import short_url from django.utils.safestring import mark_safe from...

How to display data Today, Yesterday and last 7 Days in...

Suppose you want to display Data according to filters then you can use these Query for display data for Today, yesterday and...

How to display reverse ForeignKey Relation Data in Django?

We have 2 models in our Django projects Model1 and Model2, and we have ForeignKey relation of Model1 in Model2, and we...

How to count data in Related Model in Django?

Suppose you have 2 models, one is Project and another is ProjectDetails, and you want to count any one field value from...

How to auto change status when updating form in Django?

Today i will tell you how to auto update fields in Django? Suppose you are working with Django forms...

Many-to-many relationships between Category and Products in Django?

To define a many-to-many relationship, use ManyToManyField. In this example, an SubChildCategory can be published in multiple Product objects, and a Product has multiple SubChildCategory objects:

How to Display ManyTOMany relationship data in View?

We have learned how to add many to many fields for Django models in article Many to Many relations between category and product....

User Registration and Login Authentication in Django

First Install The Django Application in Your System. Now Create app in your Django project using this command python manage.py startapp account

Popular articles