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

Generate Documentation for Spring Boot API with swagger and Open API 3

 ðŸ˜‚ How to Generate Documentation for Spring Boot API project Make sure your Project having a swagger or open API 3 Dependency then only you get proper Documentation for your Service. ---------------------------------------------------------------------------- Every method or API above you have to Write Like that then only you get proper Documentation If you do everything in your Application and Run your Application and go to browse and search. . http://localhost:8080/v3/api-docs/ if you want to learn more go with this one.  Open API-3   1. For Return List of Object then you have to use this API operation  @Operation(summary = "This will fetch List of Patient Detailas base on Hospital Name") @ApiResponses(value = { @ApiResponse(responseCode = "200", description = "Successfully fetch All Patient Details from Database ", content = {  @Content(mediaType = "application/json" ,array = @ArraySchema(schema =@Schema(implementation =PatientDe...

#FibonacciNumberSeries Write a program of Fibonacci Number Series|| Fib...

Fibonacci Number Series ============================================ 0 1 1 2 3 5 8 13............. a=0; b=1; i=2; printf(a,b); while(i<=n){ c=a+b; printf(c); a=b; b=c; i++; } =========================================================================== import java.util.Scanner; class Fibonacci { public static void main(String[] args) { Scanner sc=new Scanner(System.in); int n=sc.nextInt(); int a=0,b=1,c; System.out.print(a+" "+b); for(int i=2;i

In a new programming language how can store multiple types of data in a single variable OR is it possible how can store multiple types of data in a single variable in programming langauge

In a new programming language how can store multiple types of data in a single variable  OR is it possible how can store multiple types of data in a single variable in a programming language Here In a new programming language how can store multiple types of  data in a single variable   help you make the new  concepts, you are learning a programming  Languages really very important: Ideally Yes. If you create an Array of objects. Then it's possible to store any data type with it as an object is the base class. ArrayList can hold multiple types of data, but array doesn't. Variables Variables can be thought of as ‘containers’ for data. Each variable has to  have a unique name, so that you can refer back to it in the program. By using variables, we can refer to values that have not yet been defined.  For example, we can refer to the speed of the ball in different parts of the  game code, but calculate the ball speed later based on different input...