Image for post
Image for post

Step 1. Setup Python: Go to home page python (remember install pip, i think version im using auto install pip so i dont need 😲)

Step 2. Go to home page of Django , and you can create project right now 😉

$ django-admin startproject project_name_here

you can create project everywhere, it dont same PHP (have to create in htdocs).

Okay, to run server, use cmd(remember cd into your project):

$ python runserver

Now, open broswer and type:

it will same this:

Image for post
Image for post

you can also change port and IP address, example:

$ python runserver 8080$ python runserver

Tip: you can edit url and use it dont need port, example:

$ python runserver

You can see folder structure of project:

  • Mysite/ folder you can see it is a package, app of project. This package same name of project, you can edit name if you want.
  • a CLI help you interact with code Django
  • all settings of this project
  • Define urls of project.
  • Use to deploy project on server.
  • f***, this file is empty 😝purpose of file make this folder become Python package.

I think everything is okay, we can develop project follow we like 😄

  • View admin view on url: /admin
  • create superuser and database:
$ python migrate
$ python createsuperuser
  • You can create app (app # project) use cmd:
$ python startapp app_name_you_want

Tip: Recommend for you video playlist about Django, hope it useful for you:

OKAY. See you next part ✌️ Sr if my english is not good 😞

Written by

Be Curious!| ☕️+✍🏼=❤️ |

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store