Skip to content

Instantly share code, notes, and snippets.

@malvat
Last active June 24, 2020 05:31
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save malvat/cd08b416013d6cdf900e459949bb21e1 to your computer and use it in GitHub Desktop.
Save malvat/cd08b416013d6cdf900e459949bb21e1 to your computer and use it in GitHub Desktop.
setting up python and Django on windows system.
# create a project
django-admin startproject <project-name>
# run the server
python manage.py runserver
# create an app
python manage.py startapp <app-name>
# make migrations
python manage.py makemigrations
# show migrations
python manage.py showmigrations
# apply migrations
python manage.py migrate
# create admin login or super user
python manage.py createsuperuser
# to see django's ORM
python manage.py shell
# extends template
{% extends "<base-template>" %}
# block ane end block template tag
{% block content %}
{% end content %}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment