Introduction To Django
Introduction To Django
Introduction To Django
Click Windows Start Button -> Type Environment Variables - > Click the first
option - > Click Environment variables Button
o OR
Right Click on This PC => Click Properties menu=> Advanced System Settings
link=> Environment Variables Button => Click on path in System Variables =>
Click Edit Button
The projects can be handled effectively using Microsoft Visual Studio Code, the most
popular IDE.
4. Install DJANGO
Go to Command Prompt (click start = > run => Type cmd => Click ok)
5. Create a Project
Go to Command Prompt (click start = > run => Type cmd => Click ok)
Steps:
> d:
(OR use Powershell window from your project folder in This PC)
The above command will create a project first in the folder d:\projects with some
basic projects files
> cd first
The above command will start the DJANGO default Development Server at
http://127.0.0.1:8000/
Go to any Browser
Go to Command Prompt (click start = > run => Type cmd => Click ok)
D:\projects\first> code .
Create a file inside the templates folder and give any name for it (eg.
home.html)
home.html Content
def homepage(request):
return render(request,’home.html’)
urlpatterns = [
path('admin/', admin.site.urls),]
The above command will start the DJANGO default Development Server at
http://127.0.0.1:8000/
Go to any Browser
Check the output in browser, You will get the dynamic content
Create a static folder in your app , in that create a style sheet style.css
h1{
color: crimson
<html>
<Head>
<Title>DJANGO</Title>
{% load static %}
</Head>
<body>
</body>
</html>
OUTPUT