1. How to Deploy Django

    Just follow the docs. That's it. However, I do find a few things wrong in the docs when I followed it. I rewrite those parts and add some comments.

    Some notes about this tutorial

    Note

    This is a tutorial. It is not intended to provide a reference guide, never mind …

    Read more
  2. Vue+Django CORS and CSRF

    Backend (Django) Part

    Docs: django-cors-headers, django core settings

    According to django-cors-headers, use:

    python -m pip install django-cors-headers
    

    to install django-cors-headers and add it to installed apps in settings.py

    INSTALLED_APPS = [
        ...,
        "corsheaders",
        ...,
    ]
    

    Add a middleware class to listen in on responses. The order of middlewares is important:

    CorsMiddleware should be placed …

    Read more

Social