Thursday, November 30, 2017

Django Learn Series | Creating a Django project



  1. source djangoTestEnv/bin/activate
  2. Create a folder like DjangoPractice on Desktop
  3. cd Desktop/DjangoPractice
  4. django-admin startproject firstdjango
    • Auto creates  a folder named firstdjango and required files in it
    • Subfolder named firstdjango inside firstdjango will have 
      • init.py
      • settings.py
        • Configures Django
      • urls.py
        • Routes requests based on URL
      • wsgi.py
        • provides a hook for webservers
        • WSGI is the Web Server Gateway Interface. It is a specification that describes how a web server communicates with web applications, and how web applications can be chained together to process one request.
        • WSGI is a Python standard described in detail in PEP 3333.
    • main folder firstdjango will have manage.py
    • manage.py runs commands related to firstdjango
  5. cd firstdjango
  6. python manage.py
    • To check list of available command
  7. python manage.py runserver
    • To start the webserver







If you enjoyed this post, make sure you subscribe to my RSS feed! Comments are encouraged

No comments:
Write comments