django服务器正在提供图像,但未显示在网页上

django服务器正在提供图像,但未显示在网页上,django,Django,我正在创建一个网站,一切正常,直到昨天网页上的图像突然停止显示。服务器似乎得到了图像,但它们没有得到显示,我不知道为什么。当我加载网页时,我会得到一个图像的占位符,就像它要加载一样,但它会消失 以下是我的配置: 设置.py 我正在使用sorl thumbnail,一个用于显示图像的django包。使用此选项,我在模板中显示图像,如下所示: template.html 在我重新启动计算机之前,图像工作正常。重新启动后,此问题开始出现,与此问题一起,我开始出现以下错误: [14/Sep/2013 1

我正在创建一个网站,一切正常,直到昨天网页上的图像突然停止显示。服务器似乎得到了图像,但它们没有得到显示,我不知道为什么。当我加载网页时,我会得到一个图像的占位符,就像它要加载一样,但它会消失

以下是我的配置:

设置.py 我正在使用sorl thumbnail,一个用于显示图像的django包。使用此选项,我在模板中显示图像,如下所示:

template.html 在我重新启动计算机之前,图像工作正常。重新启动后,此问题开始出现,与此问题一起,我开始出现以下错误:

[14/Sep/2013 15:41:48] "GET /media/cache/0a/21/0a2118ecac84d6451f3dd39cd881d8bb.jpg HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 46531)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/hammad/virt_env/virt1/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe

我搜索了错误,发现这是浏览器的问题。

哦,天哪!所有这些都是由于URL冲突造成的

(r'^media/(?p.*)$,'django.views.static.service',{'document\u root':settings.media\u root,'show\u index':True}),

url(r'^(?P<country_slug>[\w-]+)/', include('Locations.urls'), name= 'country'),
url(r'^(?P[\w-]+)/,包括('Locations.url'),名称='country'),

是否可以在memcached运行后重新启动django应用程序?我按照链接做了,但是运气不好。我也清除了缓存,但仍然无法工作。
[14/Sep/2013 15:41:45] "GET / HTTP/1.1" 200 159218
[14/Sep/2013 15:41:45] "GET /media/cache/c0/17/c017021609e735bdc53f402ae6009bae.jpg HTTP/1.1" 200 155657
[14/Sep/2013 15:41:47] "GET /saudi-arabia/ HTTP/1.1" 200 284186
[14/Sep/2013 15:41:47] "GET /media/cache/e9/25/e925347688cc973ecc997f00b6ee0b83.jpg HTTP/1.1" 200 156198
[14/Sep/2013 15:41:47] "GET /media/cache/a4/ac/a4aca3c7a23aeada770062e9519a8daa.jpg HTTP/1.1" 200 156731
[14/Sep/2013 15:41:47] "GET /media/cache/0a/21/0a2118ecac84d6451f3dd39cd881d8bb.jpg HTTP/1.1" 200 156728
[14/Sep/2013 15:41:48] "GET /media/cache/0a/21/0a2118ecac84d6451f3dd39cd881d8bb.jpg HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 46531)
Traceback (most recent call last):
  File "/usr/lib/python2.7/SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "/usr/lib/python2.7/SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "/home/hammad/virt_env/virt1/local/lib/python2.7/site-packages/django/core/servers/basehttp.py", line 150, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "/usr/lib/python2.7/SocketServer.py", line 651, in __init__
    self.finish()
  File "/usr/lib/python2.7/SocketServer.py", line 710, in finish
    self.wfile.close()
  File "/usr/lib/python2.7/socket.py", line 279, in close
    self.flush()
  File "/usr/lib/python2.7/socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 32] Broken pipe
url(r'^(?P<country_slug>[\w-]+)/', include('Locations.urls'), name= 'country'),