Skip to main content

How to create First application in Django | Application in Django | best way Application

😀  If you want to Develop a firsts application through then you can read this post completely 

Give the detailed steps for building a simple application in Django.

Here...the details steps for building a simple application in Django 

   step by step Excellent idea to help you make the new concepts, you are learning 

   as a beginner to a Django 

   Give the detailed steps for building a simple application in Django

   it's really very most important:



=>Django Installation

    To install Django, first, visit Django official site (https://www.djangoproject.com) and 

    download Django by clicking on the download section. Here, we will see 

    various options to download The Django.


 =>Django requires pip to start the installation. Pip is a package management system which is 

     used to install and manage packages written in python. 

     For Python 3.4 and higher versions, pip3 is used to manage packages.

=> In this tutorial, we are installing Django in the windows operating system.

  =>The complete installation process is described below. Before 

       installing make sure pip is installed in the local system.


 Here, we are installing Django using pip3, the installation command is given below.

   >>pip3 install django==2.0.3  

 =>Verify Django Installation

  =>After installing Django, we need to verify the installation. Open terminal and 

  =>write python3 and press enter. It will display python shell 

  =>where we can verify the Django installation.

 =>Django Project

        In the previous topic, we have installed Django successfully. 

        Now, we will learn step by step process to create a Django application.

  To create a Django project, we can use the following command. the project name is the name of the Django application.

>>django-admin startproject project name 

  Django Project Example

     Here, we are creating a project djangpapp in the current directory.


 >>django-admin startproject djangpapp  

................................................................................

     Locate into the Project

     Now, move to the project by changing the directory. 

    The Directory can be changed by using the following command.


 >>cd djangpapp  

...............................................................................

To see all the files and subfolders of the Django project, we can use the tree command to view the tree structure of the application. This is a utility 

      command, if it is not present, can be downloaded via apt-get install tree command.


    =>A Django project contains the following packages and files. 

        The outer directory is just a container for the application. 

        We can rename it further.


      =>1.manage.py: It is a command-line utility which allows us to interact with 

                          the project in various ways and also used to manage an application 

                          that we will see later on in this tutorial.

                          A directory (djangpapp) located inside, is the actual application package name. 

                          Its name is the Python package name which we'll need 

                          to use to import module inside the application.

 =>2.__init__.py: It is an empty file that tells to Python that this 

                               the directory should be considered as a Python package.


  =>3.settings.py: This file is used to configure application settings 

                             such as database connection, static files linking etc.


 =>4.urls.py: This file contains the listed URLs of the application. In this file, we can 

                      mention the URLs and corresponding actions 

                      to perform the task and display the view.


=>5.wsgi.py:It is an entry-point for WSGI-compatible web servers to serve Django project.

                       Initially, this project is a default draft which contains all 

                       the required files and folders.


  =>Running the Django Project

     Django project has a built-in development server which is used to run application instantly without any external web server. It means we don't need of 

     Apache or another webserver to run the application in development mode.

 =>To run the application, we can use the following command.


   >>python3 manage.py run server  


the server has started and can be accessed at localhost with port 

8000. Let's access it using the browser, it looks like the below

/'''..............................................The image here...................................................'''/


  The application is running successfully. Now, we can customize 

  it according to our requirement and can develop 

  a customized web application.

........................................................................................................................

Conclusion-In this tutorial you will have to learn the detailed steps for building a simple application in Django 

                based on Django(Python framework) programming language

                So hope you liked these tutorials.If you have any questions or 

                suggestions related to Django, please comment below and let us know.

                Finally, if you find this post informative, then share it with 

                your friends on Facebook, Twitter, Instagram. 


 Thank you...









Comments

Popular posts from this blog

How to Send OTP in Mobile Number | login with OTP mobile Number | How to send OTP in mobile no with Spring Boot APP

   ðŸ˜‚               Login with Mobile Number OTP ---------------------------------------------------------------------------- If you want to develop a project to log in with OTP mobile Number in Spring Boot Applications then this post for you. In this post, I am going to use some other service to send the OTP in mobile number. we have to use it in this project spring boot. we are going to use Twilio to send SMS. we are going to use a web socket to send the data from the browser to the SMS gateway. Oracle Database for store the user details. <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-thymeleaf</artifactId> <version>2.3.3.RELEASE</version> </dependency> <dependency> <groupId>com.twilio.sdk</grou

Spring Boot With MySQL Database connection with Examples | MySQl Database Configuration with Spring Boot Projects

 ðŸ˜ƒ MySQL Database Configuration with Spring Boot Projects  In this article, we are going to introduce How to connect MySQL Database with the Spring Boot project. pom.xml   <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-jpa</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-devtools</artifactId> <scope>runtime</scope> <optional>true</optional> </dependency> <dependency> <groupId>mysql</groupId> <artifactId>mysql-connector-java</artifactId> <scope>runtime</scope> </dependency> <dependency> <groupId>org.projectlombok</gro

How can we create Auto generated field or ID for mongodb using spring boot

😂 How can we create an Auto-generated field or ID for MongoDB using spring boot? First Create One Application Like Mongodb_sequence-id-generator Pom.XML <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-web</artifactId> </dependency> <dependency> <groupId>org.springframework.boot</groupId> <artifactId>spring-boot-starter-data-mongodb</artifactId> </dependency> <dependency> <groupId>de.flapdoodle.embed</groupId> <artifactId>de.flapdoodle.embed.mongo</artifactId> </dependency> User.java package com.app; import org.springframework.data.annotation.Id; import org.springframework.data.annotation.Transient; import org.springframework.data.mongodb.core.mapping.Document; @Document(collection = "users_db") public class User { @Transient public static final String SEQUENCE_NAME = &