{"id":80888,"date":"2021-06-15T09:00:21","date_gmt":"2021-06-15T03:30:21","guid":{"rendered":"https:\/\/techvidvan.com\/tutorials\/?p=80888"},"modified":"2021-06-15T09:00:21","modified_gmt":"2021-06-15T03:30:21","slug":"create-your-first-django-project","status":"publish","type":"post","link":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/","title":{"rendered":"Learn the Steps to Create Your First Django Project"},"content":{"rendered":"<p><span style=\"font-weight: 400\">The installation and setting up of the virtual environment are over. Now, the next step is to create your first project using the Django web framework and run that project on the test server.<\/span><\/p>\n<p><span style=\"font-weight: 400\">This tutorial will guide you through the steps required for creating and running your first project.<\/span><\/p>\n<p><span style=\"font-weight: 400\">So, here are the easy steps you should follow to get going.<\/span><\/p>\n<h3>Prerequisites to Create your First Django Project<\/h3>\n<p><span style=\"font-weight: 400\">Make sure that the following prerequisites are satisfied:<\/span><\/p>\n<p><span style=\"font-weight: 400\">1. You should have a Python Interpreter installed in your system. You can refer to the previous articles for the steps to download Python.<\/span><\/p>\n<p><span style=\"font-weight: 400\">2. You should have Django Package installed. Previous articles can be referred to, for the same.<\/span><\/p>\n<p><span style=\"font-weight: 400\">3. Virtualenv<\/span><\/p>\n<p><span style=\"font-weight: 400\">4. Visual Studio Code<\/span><\/p>\n<p><span style=\"font-weight: 400\">For this tutorial, the following version is put in use:\u00a0<\/span><\/p>\n<ul>\n<li><span style=\"font-weight: 400\">Python 3.9.4<\/span><\/li>\n<li><span style=\"font-weight: 400\">Django 3.2.3<\/span><\/li>\n<li><span style=\"font-weight: 400\">Visual Studio Code 1.56.2<\/span><\/li>\n<\/ul>\n<h3>Steps to create a Project in Django<\/h3>\n<p><b>Step 1.\u00a0 Open the Window PowerShell<\/b><\/p>\n<p><span style=\"font-weight: 400\">Window PowerShell will provide great help throughout the Django learning series if you are a Windows user.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Go to Windows search and type <\/span><b>Window PowerShell<\/b><span style=\"font-weight: 400\">, choose the option displayed on top of the search.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django_First_Project.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80986\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django_First_Project.png\" alt=\"Django_First_Project\" width=\"1460\" height=\"920\" \/><\/a><\/p>\n<p><b>Step 2:\u00a0 Create a New Folder<\/b><\/p>\n<p><span style=\"font-weight: 400\">Creating a different folder for all the projects is a great job. This will help you to manage all your projects, copy some previous code if you need it, and help you to merge different features of previous projects.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Follow the command shown below in the image.\u00a0<\/span><\/p>\n<p><span style=\"font-weight: 400\">Type <\/span><b>mkdir Projects, <\/b><span style=\"font-weight: 400\">this will create a folder named Projects in the directory you are currently in.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/First-Django-project_2.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80976\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/First-Django-project_2.png\" alt=\"First Django project\" width=\"1920\" height=\"1028\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">So, as you can see, <\/span><b>\u201cProjects\u201d<\/b><span style=\"font-weight: 400\"> folder is created.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_3.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80977\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_3.png\" alt=\"Django Project\" width=\"1920\" height=\"1032\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">\u00a0But it is empty right now.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Dango-First-project_4.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80978\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Dango-First-project_4.png\" alt=\"Django First project\" width=\"1920\" height=\"1032\" \/><\/a><\/p>\n<p><b>Step 3: Creating First Project<\/b><\/p>\n<p><span style=\"font-weight: 400\">Type <\/span><b>cd Projects<\/b><span style=\"font-weight: 400\"> to access the folder.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now type <\/span><b>django-admin startproject TechVidvan<\/b><span style=\"font-weight: 400\">. You can write any name in place of\u00a0 <\/span><span style=\"font-weight: 400\">\u201cTechVidvan\u201d, as your project name.\u00a0<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_5.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80979\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_5.png\" alt=\"Django Project\" width=\"1920\" height=\"1028\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">Type <\/span><b>cd TechVidvan<\/b><span style=\"font-weight: 400\"> to access the folder.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Now you can see that the<\/span><b> \u201cProjects\u201d <\/b><span style=\"font-weight: 400\">folder is not empty, it has a new folder in it named \u201cTechVidvan\u201d.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create-First-Django-Project_6.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80980\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create-First-Django-Project_6.png\" alt=\"Create First Django Project\" width=\"1920\" height=\"1028\" \/><\/a><\/p>\n<p><b>Step 4:<\/b><\/p>\n<p><span style=\"font-weight: 400\">Type <\/span><b>dir.\u00a0<\/b><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-First-project_7.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80981\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-First-project_7.png\" alt=\"Django First project\" width=\"1920\" height=\"1028\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">This will create all the necessary files that you need to run your project<\/span><b>( _init, settings, urls, wsgi, manage.py)<\/b><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_8.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80982\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project_8.png\" alt=\"Django Project\" width=\"1920\" height=\"1032\" \/><\/a><\/p>\n<p><b>Step 5: Running the Test Server<\/b><\/p>\n<p><span style=\"font-weight: 400\">We will work with manage.py for running our project on the Test Server among all these different files.<\/span><\/p>\n<p><span style=\"font-weight: 400\">Type <\/span><b>python manage.py runserver<\/b><\/p>\n<p><span style=\"font-weight: 400\">The output of the command is as follows.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create-First-Django-Project_9.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80983\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Create-First-Django-Project_9.png\" alt=\"Create First Django Project\" width=\"1920\" height=\"1032\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">This is your Localhost IP address with port no 8000. <\/span><span style=\"font-weight: 400\">Copy that IP address and make a google search.<\/span><\/p>\n<p><a href=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project-for-Beginners_10.png\"><img loading=\"lazy\" decoding=\"async\" class=\"aligncenter size-full wp-image-80984\" src=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/sites\/2\/2021\/06\/Django-Project-for-Beginners_10.png\" alt=\"Django Project for Beginners\" width=\"1920\" height=\"1032\" \/><\/a><\/p>\n<p><span style=\"font-weight: 400\">This is the Test server page, it doesn\u2019t show anything, right? Because we have not started the real work yet.<\/span><\/p>\n<p><span style=\"font-weight: 400\">The upcoming tutorials will teach you how to create the web applications that you want to.\u00a0<\/span><\/p>\n<h3>Summary<\/h3>\n<p><span style=\"font-weight: 400\">So, you just learned how to create and run your first Django project. This was a crucial part that is required before going deep inside.<\/span><\/p>\n<p><span style=\"font-weight: 400\">We will discuss all the necessary file structures and talk about Django architecture and other aspects of the Django framework in the upcoming articles.<\/span><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The installation and setting up of the virtual environment are over. Now, the next step is to create your first project using the Django web framework and run that project on the test server.&#46;&#46;&#46;<\/p>\n","protected":false},"author":1,"featured_media":80974,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[3383],"tags":[3523,3382,3524,3525],"class_list":["post-80888","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-django","tag-create-django-project","tag-django-project","tag-first-django-project","tag-how-to-create-your-first-django-project"],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v27.7 - https:\/\/yoast.com\/product\/yoast-seo-wordpress\/ -->\n<title>Learn the Steps to Create Your First Django Project - TechVidvan<\/title>\n<meta name=\"description\" content=\"If you are a beginner and just started learning Django, this is the first Django Project explained in steps by steps manner for easy learning.\" \/>\n<meta name=\"robots\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"Learn the Steps to Create Your First Django Project - TechVidvan\" \/>\n<meta property=\"og:description\" content=\"If you are a beginner and just started learning Django, this is the first Django Project explained in steps by steps manner for easy learning.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/\" \/>\n<meta property=\"og:site_name\" content=\"TechVidvan\" \/>\n<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/TechVidvan\/\" \/>\n<meta property=\"article:published_time\" content=\"2021-06-15T03:30:21+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg\" \/>\n\t<meta property=\"og:image:width\" content=\"1200\" \/>\n\t<meta property=\"og:image:height\" content=\"628\" \/>\n\t<meta property=\"og:image:type\" content=\"image\/jpeg\" \/>\n<meta name=\"author\" content=\"TechVidvan Team\" \/>\n<meta name=\"twitter:card\" content=\"summary_large_image\" \/>\n<meta name=\"twitter:creator\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:site\" content=\"@vidvantech\" \/>\n<meta name=\"twitter:label1\" content=\"Written by\" \/>\n\t<meta name=\"twitter:data1\" content=\"TechVidvan Team\" \/>\n\t<meta name=\"twitter:label2\" content=\"Est. reading time\" \/>\n\t<meta name=\"twitter:data2\" content=\"5 minutes\" \/>\n<!-- \/ Yoast SEO plugin. -->","yoast_head_json":{"title":"Learn the Steps to Create Your First Django Project - TechVidvan","description":"If you are a beginner and just started learning Django, this is the first Django Project explained in steps by steps manner for easy learning.","robots":{"index":"index","follow":"follow","max-snippet":"max-snippet:-1","max-image-preview":"max-image-preview:large","max-video-preview":"max-video-preview:-1"},"canonical":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/","og_locale":"en_US","og_type":"article","og_title":"Learn the Steps to Create Your First Django Project - TechVidvan","og_description":"If you are a beginner and just started learning Django, this is the first Django Project explained in steps by steps manner for easy learning.","og_url":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/","og_site_name":"TechVidvan","article_publisher":"https:\/\/www.facebook.com\/TechVidvan\/","article_published_time":"2021-06-15T03:30:21+00:00","og_image":[{"width":1200,"height":628,"url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg","type":"image\/jpeg"}],"author":"TechVidvan Team","twitter_card":"summary_large_image","twitter_creator":"@vidvantech","twitter_site":"@vidvantech","twitter_misc":{"Written by":"TechVidvan Team","Est. reading time":"5 minutes"},"schema":{"@context":"https:\/\/schema.org","@graph":[{"@type":"Article","@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#article","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/"},"author":{"name":"TechVidvan Team","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22"},"headline":"Learn the Steps to Create Your First Django Project","datePublished":"2021-06-15T03:30:21+00:00","mainEntityOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/"},"wordCount":494,"commentCount":0,"publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg","keywords":["Create Django Project","Django Project","First Django Project","How to Create Your First Django Project"],"articleSection":["Django Tutorials"],"inLanguage":"en-US","potentialAction":[{"@type":"CommentAction","name":"Comment","target":["https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#respond"]}]},{"@type":"WebPage","@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/","url":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/","name":"Learn the Steps to Create Your First Django Project - TechVidvan","isPartOf":{"@id":"https:\/\/techvidvan.com\/tutorials\/#website"},"primaryImageOfPage":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#primaryimage"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#primaryimage"},"thumbnailUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg","datePublished":"2021-06-15T03:30:21+00:00","description":"If you are a beginner and just started learning Django, this is the first Django Project explained in steps by steps manner for easy learning.","breadcrumb":{"@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#breadcrumb"},"inLanguage":"en-US","potentialAction":[{"@type":"ReadAction","target":["https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/"]}]},{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#primaryimage","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2021\/06\/Create-a-project-in-Django.jpg","width":1200,"height":628,"caption":"Create first project in Django"},{"@type":"BreadcrumbList","@id":"https:\/\/techvidvan.com\/tutorials\/create-your-first-django-project\/#breadcrumb","itemListElement":[{"@type":"ListItem","position":1,"name":"Home","item":"https:\/\/techvidvan.com\/tutorials\/"},{"@type":"ListItem","position":2,"name":"Learn the Steps to Create Your First Django Project"}]},{"@type":"WebSite","@id":"https:\/\/techvidvan.com\/tutorials\/#website","url":"https:\/\/techvidvan.com\/tutorials\/","name":"TechVidvan Blogs","description":"","publisher":{"@id":"https:\/\/techvidvan.com\/tutorials\/#organization"},"potentialAction":[{"@type":"SearchAction","target":{"@type":"EntryPoint","urlTemplate":"https:\/\/techvidvan.com\/tutorials\/?s={search_term_string}"},"query-input":{"@type":"PropertyValueSpecification","valueRequired":true,"valueName":"search_term_string"}}],"inLanguage":"en-US"},{"@type":"Organization","@id":"https:\/\/techvidvan.com\/tutorials\/#organization","name":"TechVidvan","url":"https:\/\/techvidvan.com\/tutorials\/","logo":{"@type":"ImageObject","inLanguage":"en-US","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/","url":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","contentUrl":"https:\/\/techvidvan.com\/tutorials\/wp-content\/uploads\/2024\/03\/techvidvan-logo-200x50-1.webp","width":200,"height":50,"caption":"TechVidvan"},"image":{"@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/logo\/image\/"},"sameAs":["https:\/\/www.facebook.com\/TechVidvan\/","https:\/\/x.com\/vidvantech"]},{"@type":"Person","@id":"https:\/\/techvidvan.com\/tutorials\/#\/schema\/person\/e9c26e74dd3d87421f7ada9433b8cd22","name":"TechVidvan Team","description":"The TechVidvan Team delivers practical, beginner-friendly tutorials on programming, Java, Python, C++, DSA, AI, ML, data Science, Android, Flutter, MERN, Web Development, and technology. Our experts are here to help you upskill and excel in today\u2019s tech industry."}]}},"amp_enabled":true,"_links":{"self":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/80888","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/comments?post=80888"}],"version-history":[{"count":0,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/posts\/80888\/revisions"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media\/80974"}],"wp:attachment":[{"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/media?parent=80888"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/categories?post=80888"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/techvidvan.com\/tutorials\/wp-json\/wp\/v2\/tags?post=80888"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}