Django Setup using pyCharm

Prerequisite

  1. python installation (version will be >3.x.x)
  2. Pycharm Installation
  3. Basic knowledge of python programming

Django installation

  1. Open pycharm -> create a new project name
  2. create django project using below code in terminal
django-admin startproject myproject

The above command will create the following files and diretory

myproject/
    manage.py
    myproject/
        __init__.py
        settings.py
        urls.py
        asgi.py
        wsgi.py

Now run the below command in terminal to run server

python manage.py runserver
Then you’ll see the following output on the command line:
Performing system checks... System check identified no issues (0 silenced). You have unapplied migrations; your app may not work properly until they are applied. Run 'python manage.py migrate' to apply them. October 14, 2020 - 11:33:42 Django version 3.1, using settings 'mysite.settings' Starting development server at http://127.0.0.1:8000/ Quit the server with CONTROL-C.

Now browse the web-page using http://127.0.0.1:8000/

Leave a Reply

Your email address will not be published. Required fields are marked *