Djangomemo
Ctrl+c to break
Python manage.py runserver
python manage.py make migrations
python manage.py migrate
django-admin
(startapp, startproject, createsuperuser etc
python manage.py
null = True/False means whether the value can be null
if blank = False , you can leave the field blank without getting an error.
def home_view():
return HttpResponse“
hello world
”{{ request.user }} output username
also you can apply title filter to username like{{ request.user|title }}
request.user.is_authenticated
{% block content %)
this does’t have to be always content, you can name it with other things like content_area or whatever. Name blocks differently to distinguish them
{% endblock %}
include, or say, copy, html template documents in current html file {% include “xxx.html” %}