Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

If you finish installing django as well as python, you may able to create need to add your source code folder for efficient & convenient development. 

  1. Create a project folder in your system. In my case, I created it as "My Project"
  2. And open it by "File" → "Add Folder to Workspace"
    Image Added
  3. Now you will see like below.
    Image Added
  4. Open terminal by moving your mouse cursor on your project folder.
    Image Added


Now is time for you to create a django project by following command

...

Once you create your project space without any error, you will be able to see following directory tree on Visual Studio Code

Code Block
languagebash
lifeplanet/
    manage.py
    mysite/
        __init__.py
        settings.py
        urls.py
        wsgi.py


Image Added

If you see the same files like I listed above, now is the time for you to run your web server based on Python. You can run your web server by following command line on the root directory of your project having manage.py:

Code Block
languagebash
$ python manage.py runserver

Note that your working directory should be .../lifeplanet having manage.py file.

If you have no issues, you will be able to see following message:

...

Wow. Now you are all set to start your journey on Django !!


Info

The default connection URL defined on the project is http://127.0.0.1:8000, you can check it on your local web browser easily.

If you want to change the connection port, you can simply change it by starting server like below

Code Block
languagebash
$ python manage.py runserver 8080