百度搜索最新google-hosts,并修改hosts文件内容
- Windows 系统hosts位于 C:\Windows\System32\drivers\etc\hosts
- Android(安卓)系统hosts位于 /system/etc/hosts
- Mac(苹果电脑)系统hosts跟Linux一样位于 /etc/hosts
- iPhone(iOS)系统hosts跟Linux Mac一样位于 /etc/hosts
- Linux系统hosts位于 /etc/hosts
1, 在urls.py 文件中加入一行 admin.autodiscover()
admin.autodiscover() 是什么作用呢?
查看源码 分析到作用是把 settings.INSTALLED_APPS这个节点中的配置动态的加入到程序中来。
2,在models.py文件中将数据表注册到admin里,
from django.contrib import admin
…
admin.site.register(modelname)
/etc/apt/sources.list
deb http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.tuna.tsinghua.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.neusoft.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb-src http://mirrors.ustc.edu.cn/raspbian/raspbian/ wheezy main contrib non-free rpi
deb http://mirrors.shu.edu.cn/raspbian/raspbian/ stretch main contrib non-free rpi
–Love science, Enjoy life.