Please enable JavaScript.
Coggle requires JavaScript to display documents.
Django (Django Library (Django.http (Http404 (https://docs.djangoproject…
Django
Django Library
Django.http
HttpResponse()
Http404
https://docs.djangoproject.com/en/2.1/intro/tutorial03/#raising-a-404-error
HttpResponseRedirect
Django.urls
path()
urlpatterns = []
include()
Django.db
models
Model
CharField
max_length (required)
ForeignKey
on_delete=models.CASCADE
_set suffix
IntegerField
$ python manage.py makemigrations [appname]
$ python manage.py migrate
$ python manage.py shell
django.utils
timezone
.now()
django.admin
$ python manage.py createsuperuser
admin.site.register(Question)
https://docs.djangoproject.com/en/2.1/intro/tutorial03/#writing-more-views
- Writing views
Django.shortcuts
render()
Templating System
{% if templating_system_enabled() %}
{{ question.question_text }}
Built-in Templates
{% url 'template_name' arg1 arg2 %}
{% csrf_token %}
django.views
generic