Articles on Trending Technologies

Technical articles with clear explanations and examples

Tutorix - AI Tutor

Making a Pickle field in Django models

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 2K+ Views

Pickle in Python is primarily used in serializing and deserializing a Python object structure. In other words, it's the process of converting a Python object into a byte stream to store it in a file/database, maintain program state across sessions, or transport data over the network. In this article, we are going to see how to make a Django field which will save pickle objects. We will work with models.py and Django shell to demonstrate the functionality. Installation First, install the django-picklefield package − pip install django-picklefield Creating the Model In models.py ...

Read More

Django – Making a contact form and storing its data without model, query and html

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 1K+ Views

In Django, creating a contact form typically requires managing forms, views, models, and admin registration. However, you can simplify this process using the django-contactforms package, which provides a predefined contact form and model without writing custom code in models.py, views.py, or HTML templates. Installation and Setup First, create a Django project and app, then install the required package: pip install django-contactforms Add the package to your settings.py: INSTALLED_APPS += ["contactforms"] URL Configuration In your project's urls.py, configure the URL patterns: from django.contrib import admin from django.urls import ...

Read More

Importing data into models in Django

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 4K+ Views

In this article, we will learn how to import data from JSON format into Django models. Django supports importing data from various formats including JSON, CSV, XLSX, and YAML using the django-import-export package. We'll create a Django project with a simple model and configure it to accept imported data through the admin interface. Setup Requirements First, install the required package ? pip install django-import-export Add the package to your Django project's INSTALLED_APPS in settings.py ? INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', ...

Read More

Implementing models reversion in Django

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 1K+ Views

In this article, we will learn how to implement django-reversion for tracking model changes, recovering deleted data, and maintaining version history of Django model objects. Django reversion provides powerful data recovery capabilities and complete object tracking. Setup and Installation First, create a Django project and app, then install the required package − pip install django-reversion Add reversion to your INSTALLED_APPS in settings.py − INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', ...

Read More

How to make any Django model's file downloadable?

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 1K+ Views

You can use the django-downloadview package to make any file in your Django model downloadable. This package provides a simple way to serve files while handling security and performance considerations. In this article, we will see how to make a file downloadable in our Django project using django-downloadview. Installation First, install the package using pip: pip install django-downloadview Now create a Django project and an app. Set up urls and add the app in INSTALLED_APPS. Also set up MEDIA_ROOT and MEDIA_URL in settings.py. Creating the Model In models.py, create a model ...

Read More

How to implement django-material in your Django project?

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 2K+ Views

Django-material is a library that applies Google's Material Design styling to Django forms without requiring external CDNs. It automatically transforms your standard Django form widgets into beautiful, Material Design-styled components. Installation First, install the django-material package using pip ? pip install django-material Configuration Add 'material' to your INSTALLED_APPS in settings.py ? INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'material', # ...

Read More

Django – Handling multiple forms in single view

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 6K+ Views

In Django web development, you often need to handle multiple forms within a single view. This article demonstrates how to create a function that manages two forms simultaneously using Django's MultiModelFormView. Project Setup Create a Django project and app. For this example, we'll use "multipleFormHandle" as the project name and "formhandlingapp" as the app name. Complete the basic setup by including the app in settings.py INSTALLED_APPS and adding the app's URL to the project's main URL configuration. Create forms.py in the app directory and a "templates" folder containing home.html. Install the required library ? ...

Read More

Google Authentication in Django

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 3K+ Views

Google Authentication allows users to log into your Django application using their Google accounts. This article demonstrates how to implement Google social authentication using Django Allauth library. Setting Up Google OAuth Credentials First, configure Google OAuth credentials in Google Cloud Console ? Go to Google Cloud Console and create a project. Navigate to OAuth consent screen and create a consent screen. Go to Credentials and click "Create Credentials" → "OAuth client ID". Select "Web application" and add these URLs: http://127.0.0.1:8000/ http://127.0.0.1:8000/accounts/google/login/callback/ Save the generated Client ID and Client Secret for later ...

Read More

Enabling GitHub OAuth in Django

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 830 Views

Django allows integration with GitHub OAuth for user authentication, making it easy for users to log in using their GitHub credentials. This tutorial demonstrates how to implement GitHub OAuth in a Django application using the django-allauth library. Setting Up GitHub OAuth Application First, create a GitHub OAuth application: Go to GitHub Developer Settings Create a new OAuth App with these URLs: Homepage URL: http://127.0.0.1:8000/ Authorization callback URL: http://127.0.0.1:8000/accounts/github/login/callback/ Save the Client ID and Client Secret ...

Read More

Exporting models data in Django

Ath Tripathi
Ath Tripathi
Updated on 26-Mar-2026 938 Views

In this article, we will see how to export model data in .csv format. Sometimes, you might need to export your model data in different formats such as .csv, json, or .xlsx for further work or reporting. Django provides an elegant solution using the django-import-export package. We will create a Django project with a simple model and configure it to enable data export functionality through the Django admin interface. Installation and Setup First, install the required package − pip install django-import-export Add the library to your project's INSTALLED_APPS in settings.py − ...

Read More
Showing 4001–4010 of 61,298 articles
« Prev 1 399 400 401 402 403 6130 Next »
Advertisements