240 发简信
IP属地:云南
  • Django字段类型清单

    Django字段类型清单 AutoField:自动递增的整型字段,添加记录时它会自动增长。通常不需要直接使用这个字段;如果你不指定主键的话,系统...

  • django contenttype

    from django.shortcuts import render, HttpResponsefrom app01 import model...

  • 使用MySql时报错:Error loading MySQLdb module: No module named 'MySQLdb'

    因为Python3.5+并不支持MySQLdb,使用MySql可以使用pymysql代替,据说两者使用方式相同 第一步安装: pip insta...

  • from django.template import Context,Template

    >>> python manange.py shell (进入该django项目的环境)>>> from django.template im...

  • 【git】强制覆盖本地代码(与git远程仓库保持一致)

    git强制覆盖: git fetch --all git reset --hard origin/master git pull git强...

  • django template context_processors 模板全局变量

    每次返回response,都要加一样的变量,如,{'user': username, 'role': role}。 这时候采用 context_...

  • ForeignKey ManyToManyField 中related_name使用 及models 中clean方法

    # -*- coding:utf-8 -*-from django.db import modelsfrom django.contrib.au...

  • 探索Django载入模板的顺序

    Django默认会在配置文件setting.py的TEMPLATE_LOADERS中开启'django.template.loaders.fil...

  • django template context_processors 模板全局变量

    每次返回response,都要加一样的变量,如,{'user': username, 'role': role}。 这时候采用 context_...

个人介绍
python程序员
前端:html,css,javascript,jQuery,ajax,bootstrap
后端:django,flask
爬虫:scrapy