FreeNAS 8.0 i386 (RC5): Config save failed
This project has moved to github - see https://github.com/freenas
Brought to you by:
cochard,
mattolander
Tested from Firefox 4.0 - configuration save leads to following error:
AttributeError at /system/config/save/
'module' object has no attribute 'now'
Request Method: GET
Request URL: http://172.20.66.252/system/config/save/
Django Version: 1.2.5
Exception Type: AttributeError
Exception Value:
'module' object has no attribute 'now'
Exception Location: /usr/local/www/freenasUI/system/views.py in config_save, line 219
For some reason:
from datetime import datetime
Is behaving like:
import datetime
It's odd, but I had exactly the same problem in a (Django) app I was working on.
Couldn't attach as a file, this fixed the problem for me:
--- /tmp/views.py 2011-04-29 13:16:12.000000000 +1000
+++ /usr/local/www/freenasUI/system/views.py 2011-04-29 13:14:11.000000000 +1000
@@ -216,7 +216,7 @@
wrapper = FileWrapper(file(filename))
response = HttpResponse(wrapper, content_type='application/octet-stream')
response['Content-Length'] = os.path.getsize(filename)
- response['Content-Disposition'] = 'attachment; filename=freenas-%s.db' % datetime.now().strftime("%Y-%m-%d")
+ response['Content-Disposition'] = 'attachment; filename=freenas-%s.db' % datetime.datetime.now().strftime("%Y-%m-%d")
return response
def reporting(request):