django
django
时间抹去了记忆
这个作者很懒,什么都没留下…
展开
-
django settings配置注释
""" Django settings for dev project. Generated by 'django-admin startproject' using Django 2.0.4. For more information on this file, see https://docs.djangoproject.com/en/2.0/topics/settings/ For t...原创 2020-01-07 10:01:31 · 84 阅读 · 0 评论 -
django 后端笔记
# csrf_exempt 跨域解决注释 @csrf_exempt # 判断用户是否登录 if request.user.is_authenticated: # 对象是否激活、启用、可用、正常状态。 if user is not None and user.is_active: # @login_required使用这个方法是要求用户登录的,用户还没有登录,默认会跳转到‘/a...原创 2020-01-07 10:00:39 · 53 阅读 · 0 评论 -
django 前端
# 继承page_main.html 文件 {% extends "general/page_main.html" %} # 调用urlcheck.py 文件 {% load urlcheck %} # 不使用路径写法,方便settings改配置static写法 {% load staticfiles %} # 例如:<link href="{% static '' %}global/plu...原创 2019-12-26 12:00:23 · 66 阅读 · 0 评论