I've been using Django 1.3 with Python 2.6 on Ubuntu 10.10. I have 3 questions.
- I recall having this problem on Windows 7 when I used Django a while ago. However, I also remember that when I first used Django this problem didn't occur.
When I access Django via 127.0.0.1:8000
, after starting a brand new project, I can reach the site, but sometimes it takes a good 10-20 secs and sometimes more to reach it. Also, on a project I've barely worked on, I have the same problems and also get errors like:
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',})
However, when I go to 127.0.0.1:8000/static/css.css
I can't find the file I placed in the folder. What did I do wrong?
Thanks for all the help!