-
-
God of Avalon
-
Vue Learning Notes
Style Related
Add Style to the Chosen Router Link
The chosen router link has a class
.router-link-exact-active
Vue Router Related
Navigation Guard
Docs: Navigation Guards
As the name suggests, the navigation guards provided by Vue router are primarily used to guard navigations either by redirecting it or canceling it.
To …
Read more -
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 insettings.py
INSTALLED_APPS = [ ..., "corsheaders", ..., ]
Add a middleware class to listen in on responses. The order of middlewares is important:
Read moreCorsMiddleware
should be placed …