1
yueyoum 2014-02-26 10:08:50 +08:00
|
2
mengzhuo 2014-02-26 14:27:15 +08:00
开发时丢在本地
部署时用nginx |
3
glasslion 2014-02-26 20:49:41 +08:00
既然用了 Django ,静态文件相关的操作就全部交给 storage system 去做
国外常见的存储平台基本上都有现成的第三方package时限好了 七牛已经有了python SDK,自己实现一个django custom storage应该很容易。将来要迁移到别的平台也不用改代码. 参考: https://docs.djangoproject.com/en/dev/howto/custom-file-storage/ https://git.oschina.net/miao/django-upyun-storage/blob/master/django_upyun/storage.py https://github.com/ftao/django-upyun-storage/blob/master/upyunstorage/backends/upyun.py |