![](https://img-blog.csdnimg.cn/20190918140213434.png?x-oss-process=image/resize,m_fixed,h_224,w_224)
Django
Django
Master-Ji
这个作者很懒,什么都没留下…
展开
-
Django REST framemwork Token Authentication and JSON Web Token Authentication
一、Token Authentication的应用 (1)首先注册应用:'rest_framework.authtoken' INSTALLED_APPS = [ ... 'rest_framework.authtoken' ] 然后python manage.py migrate 进行迁移, 数据库中会生成authtoken_token表 (2)获取to...原创 2019-12-25 15:25:12 · 429 阅读 · 0 评论 -
Django 缓存机制 Redis缓存
Django 提供6种缓存方式 (1)开发调式缓存 (2)内存缓存 (3)文件缓存 (4)数据库缓存 (5)Memcache缓存(使用Python-memcached模块) (6)Memcache缓存(使用pylibmc模块) 常用的缓存方式是 文件缓存 和 Memcache缓存 1. Django开发调式缓存 from django.views.decorator...原创 2019-12-26 17:23:07 · 215 阅读 · 0 评论 -
复习 django timezone 和 进程
from django.db import models from django.contrib.auth.models import User class ResourceUsage(models.Model): class Meta: db_table = 'mls_resourceusage' user = models.ForeignKey(User...原创 2020-01-07 22:04:28 · 100 阅读 · 0 评论