Creating a project in Django - Step 3

In my last blog post, we've installed Python and Django, today we are going to create a Django project.

Steps: -

  1. Open Command prompt in admin mode and go ahead and navigate to wherever you want to create Django project. I have created this project in Learn Django dir.
  2. This is tool which we have got to create starter Django files.These are just the core files which we have to use in Django project. so, the command for that 
    1. django-admin startproject MyFirstDjangoProject
  3. This will create Django project file structure
  4. Lets open the project in Pycharm which is JetBrains tool
  5. Let talk about the manage.py file first and other files which we are going to use.
    1. Never edit this file,Never delete this file 
    2. Its a program that comes with Django and lets do bunch ok cool stuff its allow you to access Database, create user and learn more how and when we use this file.
  6. settings.py:- This file is used for configuration and setting like configuring the database registering the app, creating users. This file also contains the overall setting of the project.
  7. url.py:- these are url declaration or you can your route config of your Django project.   
  8. Now are all set and created our Django project lets run the application.
  9. Django comes with little development server which we going to run.
    1. python manage.py runserver
  10. Hit http://localhost:8000/ in browser
Happy coding and keep sharing !!!



Comments

Post a Comment

Popular posts from this blog

Intall Django - Step 2

What is Django and Python Web framework- Step 1