我一直在使用Ubuntu 10.10上的Python 2.6和Django 1.3,有3个问题。
1.我记得以前在Windows 7上使用Django时也遇到过这个问题。但是,当我第一次使用Django时,没有出现这个问题。
2.当我通过
1.我记得以前在Windows 7上使用Django时也遇到过这个问题。但是,当我第一次使用Django时,没有出现这个问题。
2.当我通过
127.0.0.1:8000
访问Django,启动一个全新的项目后,有时需要等待10-20秒甚至更长时间才能访问该站点。在我几乎没有开发的项目中,我也遇到了同样的问题,并且还出现了错误。Exception happened during processing of request from ('127.0.0.1', 47758)
Traceback (most recent call last):
File "/usr/lib/python2.6/SocketServer.py", line 283, in _handle_request_noblock
self.process_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 309, in process_request
self.finish_request(request, client_address)
File "/usr/lib/python2.6/SocketServer.py", line 322, in finish_request
self.RequestHandlerClass(request, client_address, self)
File "/usr/local/lib/python2.6/dist-packages/Django-1.3-py2.6.egg/django/core/servers/basehttp.py", line 570, in __init__
BaseHTTPRequestHandler.__init__(self, *args, **kwargs)
File "/usr/lib/python2.6/SocketServer.py", line 618, in __init__
self.finish()
File "/usr/lib/python2.6/SocketServer.py", line 661, in finish
self.wfile.flush()
File "/usr/lib/python2.6/socket.py", line 297, in flush
self._sock.sendall(buffer(data, write_offset, buffer_size))
error: [Errno 32] Broken pipe
Also, whenever I get an error I expect dcramer's django-sentry to log the error in the database, but when I go into MySQL and check the tables, there is nothing there. I followed the instructions on the site to install the app.
I placed this in my urls.py file:
url(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': '/home/user/apache2/www/django/ecomstore/static',})
然而,当我访问 127.0.0.1:8000/static/css.css
时,我找不到我放在文件夹中的文件。我做错了什么?
感谢您的所有帮助!