Python+django——使用css javascript 和图片的一些问题

标签 python mysql django

当我进入我的网站时,css javascript 和图像不起作用。当我尝试以管理员身份输入 (http:/mysite/admin) 时,出现错误“站点匹配查询不存在”。它发生在从 SQLite 和 Python 3.3 过渡到 MySQL 和 Python 2.7 之后。 错误代码:

Validating models...

0 errors found
March 18, 2014 - 23:54:12
Django version 1.6.2, using settings 'payforward.settings'
Starting development server at http://127.0.0.1:8000/
Quit the server with CTRL-BREAK.
[18/Mar/2014 23:54:28] "GET / HTTP/1.1" 200 6375
[18/Mar/2014 23:54:40] "GET /media/css/reset.css HTTP/1.1" 500 79587
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 217, in write
    self._write(data)
  File "C:\Python27\lib\socket.py", line 324, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] ��������� �� ����� ����-
[18/Mar/2014 23:54:40] "GET /media/css/reset.css HTTP/1.1" 500 59
----------------------------------------
Exception happened during processing of request from ('127.0.0.1', 52926)
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 126, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 651, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 710, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 279, in close
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10053] ��������� �� ����� ����-
--------------------------------------------------------------------------------    
[18/Mar/2014 23:54:40] "GET /media/css/jquery-ui-1.10.3.custom.min.css HTTP/1.1" 500 79984
Traceback (most recent call last):
  File "C:\Python27\lib\wsgiref\handlers.py", line 86, in run
    self.finish_response()
  File "C:\Python27\lib\wsgiref\handlers.py", line 128, in finish_response
    self.write(data)
  File "C:\Python27\lib\wsgiref\handlers.py", line 217, in write
    self._write(data)
  File "C:\Python27\lib\socket.py", line 324, in write
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] 
[18/Mar/2014 23:54:40] "GET /media/css/jquery-ui-1.10.3.custom.min.css HTTP/1.1" 500 59
Traceback (most recent call last):
  File "C:\Python27\lib\SocketServer.py", line 593, in process_request_thread
    self.finish_request(request, client_address)
----------------------------------------
  File "C:\Python27\lib\SocketServer.py", line 334, in finish_request
Exception happened during processing of request from ('127.0.0.1', 52930)
    self.RequestHandlerClass(request, client_address, self)
  File "C:\Python27\lib\site-packages\django\core\servers\basehttp.py", line 126, in __init__
    super(WSGIRequestHandler, self).__init__(*args, **kwargs)
  File "C:\Python27\lib\SocketServer.py", line 651, in __init__
    self.finish()
  File "C:\Python27\lib\SocketServer.py", line 710, in finish
    self.wfile.close()
  File "C:\Python27\lib\socket.py", line 279, in close
----------------------------------------
    self.flush()
  File "C:\Python27\lib\socket.py", line 303, in flush
    self._sock.sendall(view[write_offset:write_offset+buffer_size])
error: [Errno 10054] 
[18/Mar/2014 23:54:40] "GET /media/css/slider.css HTTP/1.1" 500 79604
[18/Mar/2014 23:54:40] "GET /media/js/index.js HTTP/1.1" 500 79506
[18/Mar/2014 23:54:51] "GET /media/images/logo.png HTTP/1.1" 500 79626

它可以是什么? 请帮帮我!

最佳答案

尝试在 Python 3 上安装 django 并逐步完成所有工作人员

关于Python+django——使用css javascript 和图片的一些问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/22492432/

相关文章:

php - 如何从另一台服务器上的文件存档恢复 Drupal 站点?

mysql - 水平合并2个表

django - 使用 Django Rest Framework 在 Pre_Save 中引发验证错误

python - 为什么我的模拟属性没有返回指定值而是返回一个 MagicMock 对象,而我的模拟方法返回预期值?

python - 求解系统微分方程(太阳和木星轨迹)

存储数据库名称的 MySQL 变量

python - 在 matplotlib patchcollection 中设置颜色范围

django - 如何在 Python 中使用 confluent-kafka 发送和使用 json 消息

Python:为模块及其导入设置 __globals__

python - 如何将路径字符串的格式更改为不同的操作系统?