Skip to content
geeksforgeeks
  • Courses
    • DSA to Development
    • Get IBM Certification
    • Newly Launched!
      • Master Django Framework
      • Become AWS Certified
    • For Working Professionals
      • Interview 101: DSA & System Design
      • Data Science Training Program
      • JAVA Backend Development (Live)
      • DevOps Engineering (LIVE)
      • Data Structures & Algorithms in Python
    • For Students
      • Placement Preparation Course
      • Data Science (Live)
      • Data Structure & Algorithm-Self Paced (C++/JAVA)
      • Master Competitive Programming (Live)
      • Full Stack Development with React & Node JS (Live)
    • Full Stack Development
    • Data Science Program
    • All Courses
  • Tutorials
    • Data Structures & Algorithms
    • ML & Data Science
    • Interview Corner
    • Programming Languages
    • Web Development
    • CS Subjects
    • DevOps And Linux
    • School Learning
  • Practice
    • GfG 160: Daily DSA
    • Problem of the Day
    • Practice Coding Problems
    • GfG SDE Sheet
  • Django
  • Views
  • Model
  • Template
  • Forms
  • Jinja
  • Python SQLite
  • Flask
  • Json
  • Postman
  • Interview Ques
  • MongoDB
  • Python MongoDB
  • Python Database
  • ReactJS
  • Vue.js
Open In App
Next Article:
Django Basics
Next article icon

Django Tutorial | Learn Django Framework

Last Updated : 27 May, 2025
Comments
Improve
Suggest changes
Like Article
Like
Report

Django is a Python framework that simplifies web development by handling complex tasks for you. It follows the "Don't Repeat Yourself" (DRY) principle, promoting reusable components and making development faster. With built-in features like user authentication, database connections, and CRUD operations, Django lets you focus on building your web applications without reinventing the wheel.

Working of Django

Django uses the MVT (Model-View-Template) design pattern:

  • Model: Represents the data you want to display, typically sourced from a database.
  • View: Handles incoming requests and returns the appropriate template and content based on the user's request.
  • Template: A text file (usually HTML) that defines the structure of the web page and includes logic for displaying the data.

Why Use Django Framework?

  • Excellent documentation and high scalability.
  • Used by Top MNCs and Companies, such as Instagram, Disqus, Spotify, Youtube, Bitbucket, Dropbox, etc. and the list is never-ending.
  • Web framework Django is easy to learn, rapid development, and Batteries fully included.
  • The last but not least reason to learn Django in Python, It has a huge library and features such as Web Scraping, Machine Learning, Image Processing, Scientific Computing, etc. One can integrate all this with web applications and do lots and lots of advanced stuff.

Hostinger’s VPS hosting is built for developers looking to seamlessly integrate Django and other frameworks like Node.js. With full root access and support for multiple OS options, you get total control over your environment. Enjoy lightning-fast performance, robust security, automated backups, and one-click app installations—plus, the flexibility to scale as your projects grow. It’s the perfect foundation for developing and deploying your Django applications with ease

Getting Started with Django

In this section, you'll learn how to set up and start using Django, a powerful framework for building dynamic websites. Django helps you organize your project into apps, each handling a specific task. You’ll start by creating a project, which automatically sets up the necessary folder structure and basic settings.

  • Django Basics
  • Django Installation and Setup
  • Django Project MVT Structure
  • Create a Basic Project in Django
  • Create an App in Django

Django Views

Django views are the backbone of handling user requests and rendering responses. There are two two main types of views: Function Based Views (FBVs) and Class Based Views (CBVs). Function Based Views offer simplicity and directness, allowing developers to define views as Python functions.

  • Django views
  • Function Based Views
  • Class Based Views

To learn about difference between the both the views discussed above: Class Based vs Function Based Views

Django URLs

In Django, URL patterns are used to route incoming requests to the right views in your application. Using flexible patterns, you can match URLs and connect them to specific views. Django also makes it easy to handle GET parameters passed in URLs, allowing you to access user input and customize responses efficiently.

  • Django URLs
  • URL Validator in Django
  • URL Shortener with Django
  • Django URLResolver error

Django Templates

Django templates are used to create the HTML files that display data to users. They allow you to combine static HTML with dynamic content using template tags and variables. This helps separate the design from the Python code, making your web pages easier to manage and update.

  • Django templates
  • Template Variables
  • Template Tags
  • Template Filters
  • Template Inheritance

Django Syntax

Django variables are used inside templates to display dynamic data passed from views. You can include variables within double curly braces like {{ variable_name }} to show values on your web pages.

  • Boolean Operators
  • for loop
  • if else

Django Models

Django Models are the core of database management in Django, providing an easy way to interact with your data through its powerful Object-Relational Mapping (ORM) system. This guide covers key operations like creating, updating, and deleting data using models.

  • Django Models
  • Basic App Model – Makemigrations and Migrate
  • Model data types and fields list
  • Render Model in Django Admin Interface
  • ORM – Inserting, Updating & Deleting Data
  • Field Validations and Built-In Fields

Django Admin

The Django Admin Interface is a powerful, built-in tool that automatically generates a web-based interface for managing your models and application data. With it, you can easily add, view, edit, and delete records directly from a user-friendly dashboard, without needing to write extra code.

  • Django Admin Interface
  • CRUD Operation in Django Admin
  • Customize Object Names with __str__ Method

Django Query-Sets

A QuerySet is a way to retrieve and work with data from your database using Django’s ORM. It lets you filter, sort, and manage records easily with Python, without writing SQL. QuerySets fetch data only when needed, making your app more efficient.

  • Django QuerySets: Introduction and Using get()
  • Django QuerySets fiter()
  • Django QuerySets order_by()

Django Forms

Django comes with built-in Forms that simplify creating and managing HTML forms in your web apps. These forms help collect and validate user input securely and efficiently, saving you from writing repetitive code. Whether it’s login, registration, or any data entry, Django’s built-in Forms make handling forms easy and reliable.

  • Django Forms
  • How to create a form using Django Forms ?
  • Render HTML Forms (GET & POST) in Django
  • Django Form | Data Types and Fields
  • Django Formsets

Django REST API

Django REST API helps you create web APIs easily using Django and the Django REST Framework (DRF). It lets you share your data and app logic so that websites, mobile apps, or other programs can use them. DRF includes tools to handle data formatting, user login, and permissions, making it simple to build secure and reliable APIs.

  • Django Rest API

Miscellaneous

This section covers a variety of additional Django topics that don't fit neatly into the core areas but are essential for building fully functional, secure, and user-friendly Django applications. These topics include handling asynchronous requests, managing user permissions, customizing authentication, session management, and other practical concerns developers commonly face.

  • Ajax and Asynchronous Handling
  • User Authentication and Permissions
  • Sessions and State Management
  • How to integrate Mysql database with Django?
  • Django- Debugging and Warnings
  • When to Use Django? Comparison with other Development Stacks

Django Projects

In this section, we’ll explore how to structure and manage Django projects, which form the foundation for building any web application. These projects serve as containers for multiple apps, each handling specific features like user authentication, blog management, or e-commerce.

To help you learn step-by-step, here are some basic to advanced Django projects you can try:

  • Google authentication and Fetching mails from scratch
  • ToDo webapp using Django
  • Django News App
  • Weather app using Django
  • College Management System Using Django
  • E-Commerce Website Using Django
  • Creating Word Counter App Using Django
  • Voting System Project Using Django

For more advanced Djngo Projects, refer to this article: Django Projects

Django Quiz

Test your Django knowledge by answering quiz questions. The quiz questions are meant to test your understanding of Django concepts.

Take Django Quiz

Python Django Interview Question

Interviews are most important aspect of job recruitment and you need to prepare for interviews if you want to get job sooner. We have compiled some of the most asked interview questions for Django Developers. To boost your chances of cracking Django interviews at top companies, visit:

Top 50 Django Interview Questions and Answers

Features of Django

  • Fast Development: Django helps you build web applications quickly with minimal effort.
  • Built-in Admin: It comes with a ready-to-use admin interface to manage your website data easily.
  • Security: Django has built-in protections to guard against common security threats like SQL injection, XSS, and CSRF.
  • Reusability: Django follows the DRY (Don't Repeat Yourself) principle, encouraging reusable code components.
  • Scalable: Django is designed to handle websites of all sizes, from small apps to large-scale projects.
  • ORM (Object-Relational Mapping): Easily interact with your database without writing SQL queries.
  • URL Routing: Clean and simple URL structure that maps URLs to views in your app.
  • Templating Engine: Separate your HTML from Python code using Django’s templating system, making dynamic content easy to manage.

Applications of Django

Django is a versatile web framework used in a wide range of industries and projects. Here are some common applications:

  • Content Management Systems (CMS): Django is ideal for building custom CMS platforms due to its modularity and flexibility.
  • E-commerce Sites: Platforms like e-commerce websites benefit from Django’s scalability and robust security features.
  • Social Networking Platforms: Django’s ability to handle high traffic makes it perfect for social media apps and community-based websites.
  • Data-Driven Applications: With its powerful ORM and database management capabilities, Django is great for building applications that rely on large datasets.
  • API Development: Django, coupled with Django REST Framework (DRF), makes it simple to develop robust and scalable APIs.
  • Scientific Computing Platforms: Django is used in platforms that require complex data analysis and visualization.
  • News & Publishing Platforms: Its ability to manage large volumes of content efficiently makes it a go-to for news websites and online publications.
  • Educational Platforms: Many e-learning websites and educational tools are built with Django for its scalability and security.

Django vs. Other Web Frameworks

FeatureDjangoJava Spring BootExpress.js
LanguagePythonJavaJavaScript (Node.js)
ArchitectureFull-stack (MVT)Full-stack (MVC)Minimalist
Admin InterfaceBuilt-in admin interfaceNo built-in admin interfaceNo built-in admin interface
Development SpeedFast (due to built-in features)Medium (more setup required)Fast (simple routing)
ScalabilityHighly scalableHighly scalableHighly scalable
SecurityExcellent (with built-in protections)Excellent (strong security features)Needs additional security measures
ORMPowerful ORM (built-in)Powerful ORM (Hibernate)No built-in ORM
FlexibilityModerate (convention over configuration)High (highly configurable)High (minimalist with custom flexibility)
DocumentationExtensive and detailedExtensive and detailedGood but less detailed
Best forFull-scale apps, CMS, e-commerceEnterprise-level applications, APIsReal-time apps, APIs, microservices
Learning CurveModerate (due to its many features)Steeper (requires understanding of Java ecosystem)Moderate
Use CasesSocial networks, CMS, e-commerceLarge-scale enterprise applicationsReal-time apps, microservices

Careers with Django

Here’s a table showcasing some common Django career roles along with their approximate salary ranges in both INR and USD:

Career RoleSalary (INR/year)Salary (USD/year)
Django Developer₹4,00,000 - ₹10,00,000$50,000 - $90,000
Full-Stack Developer₹6,00,000 - ₹15,00,000$60,000 - $120,000
Software Engineer₹5,00,000 - ₹12,00,000$70,000 - $110,000
DevOps Engineer₹8,00,000 - ₹18,00,000$80,000 - $140,000
Technical Lead/Architect₹12,00,000 - ₹25,00,000$100,000 - $180,000

Next Article
Django Basics
author
abhishek1
Improve
Article Tags :
  • Python
  • Python Django
  • Tutorials
  • Spotlight
Practice Tags :
  • python

Similar Reads

  • Django Tutorial | Learn Django Framework
    Django is a Python framework that simplifies web development by handling complex tasks for you. It follows the "Don't Repeat Yourself" (DRY) principle, promoting reusable components and making development faster. With built-in features like user authentication, database connections, and CRUD operati
    10 min read
  • Django Basics

    • Django Basics
      Django is a Python-based web framework which allows us to quickly develop robust web application without much third party installations. It comes with many built-in features—like user authentication, an admin panel and form handling—that help you build complex sites without worrying about common web
      3 min read

    • Django Installation and Setup
      Installing and setting up Django is a straightforward process. Below are the step-by-step instructions to install Django and set up a new Django project on your system.Prerequisites: Before installing Django, make sure you have Python installed on your system. How to Install Django?To Install Django
      2 min read

    • When to Use Django? Comparison with other Development Stacks
      Prerequisite - Django Introduction and Installation Django is a high-level Python web framework which allow us to quickly create web applications without all of the installation or dependency problems that we normally face with other frameworks. One should be using Django for web development in the
      2 min read

    • Django Project MVT Structure
      Django follows the MVT (Model-View-Template) architectural pattern, which is a variation of the traditional MVC (Model-View-Controller) design pattern used in web development. This pattern separates the application into three main components:1. ModelModel acts as the data layer of your application.
      2 min read

    • How to Create a Basic Project using MVT in Django ?
      Prerequisite - Django Project MVT Structure  Assuming you have gone through the previous article. This article focuses on creating a basic project to render a template using MVT architecture. We will use MVT (Models, Views, Templates) to render data to a local server.  Create a basic Project:  To in
      2 min read

    • How to Create an App in Django ?
      In Django, an app is a web application that performs a specific functionality, such as blog posts, user authentication or comments. A single Django project can consist of multiple apps, each designed to handle a particular task. Each app is a modular and reusable component that includes everything n
      3 min read

    • Django settings file - step by step Explanation
      Once we create the Django project, it comes with a predefined Directory structure having the following files with each file having its own uses. Let's take an example // Create a Django Project "mysite" django-admin startproject mysite cd /pathTo/mysite // Create a Django app "polls" inside project
      3 min read

    Django view

    • Views In Django | Python
      Django Views are one of the vital participants of the MVT Structure of Django. As per Django Documentation, A view function is a Python function that takes a Web request and returns a Web response. This response can be the HTML contents of a Web page, a redirect, a 404 error, an XML document, an ima
      6 min read

    • Django Function Based Views
      Django is a Python-based web framework which allows you to quickly create web application without all of the installation or dependency problems that you normally will find with other frameworks. Django is based on MVT (Model View Template) architecture and revolves around CRUD (Create, Retrieve, Up
      7 min read

    • Django Class Based Views
      Class-Based Views (CBVs) allow developers to handle HTTP requests in a structured and reusable way. With CBVs, different HTTP methods (like GET, POST) are handled as separate methods in a class, which helps with code organization and reusability.Advantages of CBVsSeparation of Logic: CBVs separate d
      6 min read

    • Class Based vs Function Based Views - Which One is Better to Use in Django?
      Django, a powerful Python web framework, has become one of the most popular choices for web development due to its simplicity, scalability and versatility. One of the key features of Django is its ability to handle views and these views can be implemented using either Class-Based Views (CBVs) or Fun
      6 min read

  • Django Templates
    Templates are the third and most important part of Django's MVT Structure. A Django template is basically an HTML file that can also include CSS and JavaScript. The Django framework uses these templates to dynamically generate web pages that users interact with. Since Django primarily handles the ba
    7 min read
  • Django Static File
    Static Files such as Images, CSS, or JS files are often loaded via a different app in production websites to avoid loading multiple stuff from the same server. This article revolves around, how you can set up the static app in Django and server Static Files from the same.Create and Activate the Virt
    3 min read
  • Django Model

    • Django Models
      A Django model is a Python class that represents a database table. Models make it easy to define and work with database tables using simple Python code. Instead of writing complex SQL queries, we use Django’s built-in ORM (Object Relational Mapper), which allows us to interact with the database in a
      8 min read

    • Django model data types and fields list
      Django models represent the structure of your database tables, and fields are the core components of those models. Fields define the type of data each database column can hold and how it should behave. This article covers all major Django model field types and their usage.Defining Fields in a ModelE
      4 min read

    • Field Validations and Built-In Fields - Django Models
      Field validations in Django help make sure the data you enter into your database is correct and follows certain rules. Django automatically checks the data based on the type of field you use, so you don’t have to write extra code to validate it yourself.Django provides built-in validations for every
      3 min read

    • How to use User model in Django?
      The Django’s built-in authentication system is great. For the most part we can use it out-of-the-box, saving a lot of development and testing effort. It fits most of the use cases and is very safe. But sometimes we need to do some fine adjustment so to fit our Web application. Commonly we want to st
      3 min read

    • Meta Class in Models - Django
      Django is a high-level Python Web framework that encourages rapid development and clean, pragmatic design. Built by experienced developers, it takes care of much of the hassle of Web development, so you can focus on writing your app without needing to reinvent the wheel. It’s free and open source. D
      3 min read

    • get_object_or_404 method in Django Models
      Some functions are hard as well as boring to code each and every time. But Django users don't have to worry about that because Django has some awesome built-in functions to make our work easy and enjoyable. Let's discuss get_object_or_404() here. What is get_object_or_404 in Django?get_object_or_404
      2 min read

    Django Forms

    • Django Forms
      Django Forms are used to gather input from users, validate that input, and process it, often saving the data to the database. For example, when registering a user, a form collects information like name, email, and password.Django automatically maps form fields to corresponding HTML input elements. I
      5 min read

    • How to Create a form using Django Forms
      This article explains how to create a basic form using various form fields and attributes. Creating a form in Django is very similar to creating a model, you define the fields you want and specify their types. For example, a registration form might need fields like First Name (CharField), Roll Numbe
      2 min read

    • Django Form | Data Types and Fields
      When collecting user input in Django, forms play a crucial role in validating and processing the data before saving it to the database. Django provides a rich set of built-in form field types that correspond to different kinds of input, making it easy to build complex forms quickly.Each form field t
      4 min read

    • Django Form | Build in Fields Argument
      We utilize Django Forms to collect user data to put in a database. For various purposes, Django provides a range of model field forms with various field patterns. The most important characteristic of Django forms is their ability to handle the foundations of form construction in only a few lines of
      3 min read

    • Python | Form validation using django
      Prerequisites: Django Installation | Introduction to DjangoDjango works on an MVT pattern. So there is a need to create data models (or tables). For every table, a model class is created. Suppose there is a form that takes Username, gender, and text as input from the user, the task is to validate th
      5 min read

    • Render Django Form Fields Manually
      Django form fields have several built-in methods to ease the work of the developer but sometimes one needs to implement things manually for customizing User Interface(UI). We have already covered on How to create and use a form in Django?. A form comes with 3 in-built methods that can be used to ren
      5 min read

    Django URLS

    • Django URLs in Python
      In Django, views are Python functions that handle HTTP requests. These views process the request and return an HTTP response or an error (e.g., 404 if not found). Each view must be mapped to a specific URL pattern. This mapping is managed through URLConf (URL Configuration).In this article, we'll ex
      3 min read

    • Get parameters passed by urls in Django
      Django is a fully fleshed framework which can help you create web applications of any form. This article discusses how to get parameters passed by URLs in django views in order to handle the function for the same. You might have seen various blogs serving with urls like: -  www.example.com/articles/
      2 min read

    • url - Django Template Tag
      A Django template is a text document or a Python string marked-up using the Django template language. Django being a powerful Batteries included framework provides convenience to rendering data in a template. Django templates not only allow passing data from view to template, but also provides some
      3 min read

    • URLField - Django Models
      URLField is a CharField, for a URL. It is generally used for storing webpage links or particularly called as URLs. It is validated by URLValidator. To store larger text TextField is used. The default form widget for this field is TextInput. Syntax field_name = models.URLField(max_length=200, **optio
      4 min read

    • URL fields in serializers - Django REST Framework
      In Django REST Framework the very concept of Serializing is to convert DB data to a datatype that can be used by javascript. Every serializer comes with some fields (entries) which are going to be processed. For example if you have a class with name Employee and its fields as Employee_id, Employee_n
      5 min read

  • Django Admin Interface - Python
    Prerequisites: Django Introduction and Installation Creating a ProjectThe Django Admin Interface is one of the most powerful features of the Django framework. It provides a ready-to-use interface for managing project data through models, allowing developers and site administrators to perform Create,
    3 min read
  • More topics on Django

    • Handling Ajax request in Django
      AJAX (Asynchronous JavaScript and XML) is a web development technique that allows a web page to communicate with the server without reloading the entire page. In Django, AJAX is commonly used to enhance user experience by sending and receiving data in the background using JavaScript (or libraries li
      3 min read

    • User Groups with Custom Permissions in Django - Python
      Our task is to design the backend efficiently following the DRY (Don't Repeat Yourself) principle, by grouping users and assigning permissions accordingly. Users inherit the permissions of their groups.Let's consider a trip booking service, how they work with different plans and packages. There is a
      4 min read

    • Django Admin Interface - Python
      Prerequisites: Django Introduction and Installation Creating a ProjectThe Django Admin Interface is one of the most powerful features of the Django framework. It provides a ready-to-use interface for managing project data through models, allowing developers and site administrators to perform Create,
      3 min read

    • Extending and customizing django-allauth in Python
      Django-allauth is a powerful Django package that simplifies user authentication, registration, account management, and integration with social platforms like Google, Facebook, etc. It builds on Django’s built-in authentication system, providing a full suite of ready-to-use views and forms.Prerequisi
      4 min read

    • Django - Dealing with Unapplied Migration Warnings
      Django is a powerful web framework that provides a clean, reusable architecture to build robust applications quickly. It embraces the DRY (Don't Repeat Yourself) principle, allowing developers to write minimal, efficient code.Create and setup a Django project:Prerequisite: Django - Creating projectA
      2 min read

    • Sessions framework using django - Python
      Django sessions let us store data for each user across different pages, even if they’re not logged in. The data is saved on the server and a small cookie (sessionid) is used to keep track of the user.A session stores information about a site visitor for the duration of their visit (and optionally be
      3 min read

    • Django Sign Up and login with confirmation Email | Python
      Django provides a built-in authentication system that handles users, login, logout, and registration. In this article, we will implement a user registration and login system with email confirmation using Django and django-crispy-forms for elegant form rendering.Install crispy forms using the termina
      7 min read

geeksforgeeks-footer-logo
Corporate & Communications Address:
A-143, 7th Floor, Sovereign Corporate Tower, Sector- 136, Noida, Uttar Pradesh (201305)
Registered Address:
K 061, Tower K, Gulshan Vivante Apartment, Sector 137, Noida, Gautam Buddh Nagar, Uttar Pradesh, 201305
GFG App on Play Store GFG App on App Store
Advertise with us
  • Company
  • About Us
  • Legal
  • Privacy Policy
  • In Media
  • Contact Us
  • Advertise with us
  • GFG Corporate Solution
  • Placement Training Program
  • Languages
  • Python
  • Java
  • C++
  • PHP
  • GoLang
  • SQL
  • R Language
  • Android Tutorial
  • Tutorials Archive
  • DSA
  • Data Structures
  • Algorithms
  • DSA for Beginners
  • Basic DSA Problems
  • DSA Roadmap
  • Top 100 DSA Interview Problems
  • DSA Roadmap by Sandeep Jain
  • All Cheat Sheets
  • Data Science & ML
  • Data Science With Python
  • Data Science For Beginner
  • Machine Learning
  • ML Maths
  • Data Visualisation
  • Pandas
  • NumPy
  • NLP
  • Deep Learning
  • Web Technologies
  • HTML
  • CSS
  • JavaScript
  • TypeScript
  • ReactJS
  • NextJS
  • Bootstrap
  • Web Design
  • Python Tutorial
  • Python Programming Examples
  • Python Projects
  • Python Tkinter
  • Python Web Scraping
  • OpenCV Tutorial
  • Python Interview Question
  • Django
  • Computer Science
  • Operating Systems
  • Computer Network
  • Database Management System
  • Software Engineering
  • Digital Logic Design
  • Engineering Maths
  • Software Development
  • Software Testing
  • DevOps
  • Git
  • Linux
  • AWS
  • Docker
  • Kubernetes
  • Azure
  • GCP
  • DevOps Roadmap
  • System Design
  • High Level Design
  • Low Level Design
  • UML Diagrams
  • Interview Guide
  • Design Patterns
  • OOAD
  • System Design Bootcamp
  • Interview Questions
  • Inteview Preparation
  • Competitive Programming
  • Top DS or Algo for CP
  • Company-Wise Recruitment Process
  • Company-Wise Preparation
  • Aptitude Preparation
  • Puzzles
  • School Subjects
  • Mathematics
  • Physics
  • Chemistry
  • Biology
  • Social Science
  • English Grammar
  • Commerce
  • World GK
  • GeeksforGeeks Videos
  • DSA
  • Python
  • Java
  • C++
  • Web Development
  • Data Science
  • CS Subjects
@GeeksforGeeks, Sanchhaya Education Private Limited, All rights reserved
We use cookies to ensure you have the best browsing experience on our website. By using our site, you acknowledge that you have read and understood our Cookie Policy & Privacy Policy
Lightbox
Improvement
Suggest Changes
Help us improve. Share your suggestions to enhance the article. Contribute your expertise and make a difference in the GeeksforGeeks portal.
geeksforgeeks-suggest-icon
Create Improvement
Enhance the article with your expertise. Contribute to the GeeksforGeeks community and help create better learning resources for all.
geeksforgeeks-improvement-icon
Suggest Changes
min 4 words, max Words Limit:1000

Thank You!

Your suggestions are valuable to us.

'); // $('.spinner-loading-overlay').show(); let script = document.createElement('script'); script.src = 'https://assets.geeksforgeeks.org/v2/editor-prod/static/js/bundle.min.js'; script.defer = true document.head.appendChild(script); script.onload = function() { suggestionModalEditor() //to add editor in suggestion modal if(loginData && loginData.premiumConsent){ personalNoteEditor() //to load editor in personal note } } script.onerror = function() { if($('.editorError').length){ $('.editorError').remove(); } var messageDiv = $('
').text('Editor not loaded due to some issues'); $('#suggestion-section-textarea').append(messageDiv); $('.suggest-bottom-btn').hide(); $('.suggestion-section').hide(); editorLoaded = false; } }); //suggestion modal editor function suggestionModalEditor(){ // editor params const params = { data: undefined, plugins: ["BOLD", "ITALIC", "UNDERLINE", "PREBLOCK"], } // loading editor try { suggestEditorInstance = new GFGEditorWrapper("suggestion-section-textarea", params, { appNode: true }) suggestEditorInstance._createEditor("") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } //personal note editor function personalNoteEditor(){ // editor params const params = { data: undefined, plugins: ["UNDO", "REDO", "BOLD", "ITALIC", "NUMBERED_LIST", "BULLET_LIST", "TEXTALIGNMENTDROPDOWN"], placeholderText: "Description to be......", } // loading editor try { let notesEditorInstance = new GFGEditorWrapper("pn-editor", params, { appNode: true }) notesEditorInstance._createEditor(loginData&&loginData.user_personal_note?loginData.user_personal_note:"") $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = true; } catch (error) { $('.spinner-loading-overlay:eq(0)').remove(); editorLoaded = false; } } var lockedCasesHtml = `You can suggest the changes for now and it will be under 'My Suggestions' Tab on Write.

You will be notified via email once the article is available for improvement. Thank you for your valuable feedback!`; var badgesRequiredHtml = `It seems that you do not meet the eligibility criteria to create improvements for this article, as only users who have earned specific badges are permitted to do so.

However, you can still create improvements through the Pick for Improvement section.`; jQuery('.improve-header-sec-child').on('click', function(){ jQuery('.improve-modal--overlay').hide(); $('.improve-modal--suggestion').hide(); jQuery('#suggestion-modal-alert').hide(); }); $('.suggest-change_wrapper, .locked-status--impove-modal .improve-bottom-btn').on('click',function(){ // when suggest changes option is clicked $('.ContentEditable__root').text(""); $('.suggest-bottom-btn').html("Suggest changes"); $('.thank-you-message').css("display","none"); $('.improve-modal--improvement').hide(); $('.improve-modal--suggestion').show(); $('#suggestion-section-textarea').show(); jQuery('#suggestion-modal-alert').hide(); if(suggestEditorInstance !== null){ suggestEditorInstance.setEditorValue(""); } $('.suggestion-section').css('display', 'block'); jQuery('.suggest-bottom-btn').css("display","block"); }); $('.create-improvement_wrapper').on('click',function(){ // when create improvement option clicked then improvement reason will be shown if(loginData && loginData.isLoggedIn) { $('body').append('
'); $('.spinner-loading-overlay').show(); jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.unlocked-status--improve-modal-content').css("display","none"); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status) }, }); } else { if(loginData && !loginData.isLoggedIn) { $('.improve-modal--overlay').hide(); if ($('.header-main__wrapper').find('.header-main__signup.login-modal-btn').length) { $('.header-main__wrapper').find('.header-main__signup.login-modal-btn').click(); } return; } } }); $('.left-arrow-icon_wrapper').on('click',function(){ if($('.improve-modal--suggestion').is(":visible")) $('.improve-modal--suggestion').hide(); else{ } $('.improve-modal--improvement').show(); }); const showErrorMessage = (result,statusCode) => { if(!result) return; $('.spinner-loading-overlay:eq(0)').remove(); if(statusCode == 403) { $('.improve-modal--improve-content.error-message').html(result.message); jQuery('.improve-modal--overlay').show(); jQuery('.improve-modal--improvement').show(); $('.locked-status--impove-modal').css("display","block"); $('.unlocked-status--improve-modal-content').css("display","none"); $('.improve-modal--improvement').attr("status","locked"); return; } } function suggestionCall() { var editorValue = suggestEditorInstance.getValue(); var suggest_val = $(".ContentEditable__root").find("[data-lexical-text='true']").map(function() { return $(this).text().trim(); }).get().join(' '); suggest_val = suggest_val.replace(/\s+/g, ' ').trim(); var array_String= suggest_val.split(" ") //array of words var gCaptchaToken = $("#g-recaptcha-response-suggestion-form").val(); var error_msg = false; if(suggest_val != "" && array_String.length >=4){ if(editorValue.length { jQuery('.ContentEditable__root').focus(); jQuery('#suggestion-modal-alert').hide(); }, 3000); } } document.querySelector('.suggest-bottom-btn').addEventListener('click', function(){ jQuery('body').append('
'); jQuery('.spinner-loading-overlay').show(); if(loginData && loginData.isLoggedIn) { suggestionCall(); return; } // script for grecaptcha loaded in loginmodal.html and call function to set the token setGoogleRecaptcha(); }); $('.improvement-bottom-btn.create-improvement-btn').click(function() { //create improvement button is clicked $('body').append('
'); $('.spinner-loading-overlay').show(); // send this option via create-improvement-post api jQuery.ajax({ url: writeApiUrl + 'create-improvement-post/?v=1', type: "POST", contentType: 'application/json; charset=utf-8', dataType: 'json', xhrFields: { withCredentials: true }, data: JSON.stringify({ gfg_id: post_id }), success:function(result) { $('.spinner-loading-overlay:eq(0)').remove(); $('.improve-modal--overlay').hide(); $('.create-improvement-redirection-to-write').attr('href',writeUrl + 'improve-post/' + `${result.id}` + '/', '_blank'); $('.create-improvement-redirection-to-write')[0].click(); }, error:function(e) { showErrorMessage(e.responseJSON,e.status); }, }); });
"For an ad-free experience and exclusive features, subscribe to our Premium Plan!"
Continue without supporting
`; $('body').append(adBlockerModal); $('body').addClass('body-for-ad-blocker'); const modal = document.getElementById("adBlockerModal"); modal.style.display = "block"; } function handleAdBlockerClick(type){ if(type == 'disabled'){ window.location.reload(); } else if(type == 'info'){ document.getElementById("ad-blocker-div").style.display = "none"; document.getElementById("ad-blocker-info-div").style.display = "flex"; handleAdBlockerIconClick(0); } } var lastSelected= null; //Mapping of name and video URL with the index. const adBlockerVideoMap = [ ['Ad Block Plus','https://media.geeksforgeeks.org/auth-dashboard-uploads/abp-blocker-min.mp4'], ['Ad Block','https://media.geeksforgeeks.org/auth-dashboard-uploads/Ad-block-min.mp4'], ['uBlock Origin','https://media.geeksforgeeks.org/auth-dashboard-uploads/ub-blocke-min.mp4'], ['uBlock','https://media.geeksforgeeks.org/auth-dashboard-uploads/U-blocker-min.mp4'], ] function handleAdBlockerIconClick(currSelected){ const videocontainer = document.getElementById('ad-blocker-info-div-gif'); const videosource = document.getElementById('ad-blocker-info-div-gif-src'); if(lastSelected != null){ document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.backgroundColor = "white"; document.getElementById("ad-blocker-info-div-icons-"+lastSelected).style.borderColor = "#D6D6D6"; } document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.backgroundColor = "#D9D9D9"; document.getElementById("ad-blocker-info-div-icons-"+currSelected).style.borderColor = "#848484"; document.getElementById('ad-blocker-info-div-name-span').innerHTML = adBlockerVideoMap[currSelected][0] videocontainer.pause(); videosource.setAttribute('src', adBlockerVideoMap[currSelected][1]); videocontainer.load(); videocontainer.play(); lastSelected = currSelected; }

What kind of Experience do you want to share?

Interview Experiences
Admission Experiences
Career Journeys
Work Experiences
Campus Experiences
Competitive Exam Experiences