
Data Structure
Networking
RDBMS
Operating System
Java
MS Excel
iOS
HTML
CSS
Android
Python
C Programming
C++
C#
MongoDB
MySQL
Javascript
PHP
- Selected Reading
- UPSC IAS Exams Notes
- Developer's Best Practices
- Questions and Answers
- Effective Resume Writing
- HR Interview Questions
- Computer Glossary
- Who is Who
Found 26504 Articles for Server Side Programming

3K+ Views
UpdateView is a view in Django which is used to update any model data from frontend. It is a built-in view that can be easily applied. It acts like an Admin page in updating the view. In this article, we will take an example and demonstrate how to use UpdateView in Django.First of all, create a Django project and an app. I created the project with the name "tutorial11" and the app with the name "modelFormsDemo".Now, let's do some basic things.Add app in settings.py −INSTALLED_APPS+ = ['modelFormsDemo']In project's urls.py, include app's urls.from django.contrib import admin from django.urls import path, include ... Read More

2K+ Views
Many online exam taking websites use text editors for text entries. image uploading, etc. Quill text editor is very popular and it also provides a model field to directly store in database. So, you don't need to configure anything extra to save its data in database.In this article, we will see how to make a text editor field in Django.First of all, create a Django project and an app. Do some basic settings like including urls of app. Create a media folder at the same level of project and app.In settings.py, add −INSTALLED_APPS = [ 'myapp.apps.MyappConfig', #django app ' django_quill' ... Read More

387 Views
Filters are really very helpful, there are many built-in filters in Django. We can also make our own filters in Django which we can use in Django projects in any template file. Filters are used in many ways like making lowercase to uppercase in HTML.In this article, we will see how to make a custom template filter tag in Django. So, let's get started.ExampleFirst of all, create a Django project and an app.Add a templates and templatetags directory in your apps root project. The project structure would look like this −example is our app and tutorial is our project.Make sure ... Read More

541 Views
In this article, we will see what is humanizer and how to use it in Django. Humanizer is a filter in Django that is used to add human touch to a project. It is one of the best filters of Django.Humanizer is used to convert numbers from numerical figures to words, or adding comma between numbers, or to convert numbers to million or billion. Let's take an example and understand how to use it.ExampleCreate a Django project and an app .Configure the project urls −from django.contrib import admin from django.urls import path, include urlpatterns = [ path('', include("humanizeproj.urls")), ... Read More

3K+ Views
DeleteView is a view in Django which is used to delete any model data from the frontend. It is a built-in view that can be easily applied. It acts like admin page in deleting the view. It is really helpful in real-world projects.First of all, create a Django project and an app. I created the project with the name "tutorial11" and the app with the name "modelFormsDemo".Now, let's do some basic things. Add the app in settings.py −INSTALLED_APPS+ = ['modelFormsDemo']In project's urls.py −from django.contrib import admin from django.urls import path, include urlpatterns = [ path('admin/', admin.site.urls), path('', ... Read More

3K+ Views
If you need to add a location field in your form or database, you can do that using charfield but it is still not that good idea. In Django, we have a third-party package called 'django-countries' that provides the country field. In this article, let's see how to use django-countries to add a Country field in Django.First, create a Django project and an app.Add the app in INSTALLED_APPS and set up urls.Install the django-countries module −pip install django-countriesIn settings.py, add this −INSTALLED_APPS += [ 'django_countries']ExampleIn app's urls.py −from django.urls import path from . import views urlpatterns = [ ... Read More

3K+ Views
Captcha is one of the modern ways used for verification in websites; it is very cool way and every second website is using it. You can use Google captcha but it is really a headache to apply it; however in Django, we have a simpler method to do so.In this article, we are going to learn how to create a captcha in a Django website. So, let's get started.ExampleFirst of all, create a Django project and an app.Now install the django-simple-captcha library −pip install django-simple-captchaGo to settings.py and inside INSTALLED_APPS, add your app and "captcha": −INSTALLED_APPS = [ 'django.contrib.admin', ... Read More

387 Views
In this article, we will see how to make a URL shortner app in Django. It is a simple app which will convert a long URL into a short one. We will achieve this using a Python library, not any Django-specific library, so you can use this code in any Python project.First of all, create a Django project and an app. Do some basic settings like including urls of app and including app in INSTALLED_APPS in settings.py.ExampleInstall the pyshorteners module −pip install pyshortenersIn app's urls.py −from django.urls import path from .views import url_shortner urlpatterns = [ path('', url_shortner.as_view(), ... Read More

698 Views
In this article, we are going to see how to make a super simple counter app, where clicking a button will add a number and it will keep doing that even if you close the tab and keep the data in session. We will get the idea of using sessions for making a simple app and how to transfer data using sessionsExampleIn urls.py, add the following lines −from django.urls import path from django.urls.resolvers import URLPattern from .import views urlpatterns = [ path('', views.counterView, name='counter'), ]Here we set up views on home url.In views.py, add the following lines −from ... Read More

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 networkIn this article, we are going to see how to make a Django field which will save pickle objects. We will only work with models.py and Django shellFirst of all, install the django-picklefield package −pip install django-picklefieldExampleIn models.py −from django.db import models from picklefield.fields import PickledObjectField # Create your models here. class new_model(models.Model): ... Read More