KEMBAR78
Install Django Project | PDF
0% found this document useful (0 votes)
17 views1 page

Install Django Project

This document outlines the steps to install and set up a Django project, including creating a project and an app. It details commands for checking the Django version, running the server, and configuring project settings and URL routing. Additionally, it provides a simple view function that returns 'Hello World' when accessed.

Uploaded by

shubhamshete691
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Install Django Project

This document outlines the steps to install and set up a Django project, including creating a project and an app. It details commands for checking the Django version, running the server, and configuring project settings and URL routing. Additionally, it provides a simple view function that returns 'Hello World' when accessed.

Uploaded by

shubhamshete691
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1

//install django module

python -m pip install django

//check django version


django-admin --version

//create django project


django-admin startproject demo

//create python app


python manage.py startapp myapp

//Run python
python manage.py runserver
//migrate
python manage.py migrate
//-------------------------------
//Step after intsalltion of django frameork and after creattion of app
--go to project setting file
INSTALLED_APPS = [
'django.contrib.admin',
'myapp'
]
from django.contrib import admin
from django.urls import path,include
urlpatterns = [
path('admin/', admin.site.urls),
path("",include("myapp.urls"))
]
//-------------------------------------
=============create one file urls.py in app=====================
from django.urls import path
from . import views
urlpatterns=[
path("",views.home,name="home")
]
============create view=======================
from django.shortcuts import render,HttpResponse
# Create your views here.
def home(request):
return HttpResponse("Hello World");

You might also like