diff --git a/blog/views.py b/blog/views.py index d598402..924ef35 100644 --- a/blog/views.py +++ b/blog/views.py @@ -216,7 +216,7 @@ def fileupload(request): fname = u''.join(str(filename)) isimage = len([i for i in imgextensions if fname.find(i) >= 0]) > 0 - basepath = os.path.join(r'/Users/liangliang/resource/' + 'files' if not isimage else'image' + '/', + basepath = os.path.join(r'/var/www/resource/image/' + 'files' if not isimage else'image' + '/', timestr) url = 'https://resource.lylinux.net/{type}/{timestr}/{filename}'.format( type='files' if not isimage else'image', timestr=timestr, filename=filename) diff --git a/requirements.txt b/requirements.txt index 6349ca6..720bc93 100644 --- a/requirements.txt +++ b/requirements.txt @@ -4,7 +4,7 @@ django-appconf==1.0.2 django-autoslug==1.9.3 django-compressor==2.1.1 django-debug-toolbar==1.8 -django-haystack==2.6.0 +django-haystack==2.6.1 django-ipware==1.1.6 django-pagedown==0.1.3 django-uuslug==1.1.8