• Как правильно раскрыть сложный json на python?

    lemar_30
    @lemar_30 Автор вопроса
    Спасибо!
    Работает!
  • Как при отправке комментария передать в базу данных родителя комментария?

    lemar_30
    @lemar_30 Автор вопроса
    В модели есть. А форма из модели у меня построена. Или я что-то не понял?
  • Ошибка: AttributeError: 'NoneType' object has no attribute 'split'. В чем дело?

    lemar_30
    @lemar_30 Автор вопроса
    sim3x, Так как все-таки исправить ошибку? По данной ссылке я не вижу, либо не понимаю как решить ее.
  • Ошибка: AttributeError: 'NoneType' object has no attribute 'split'. В чем дело?

    lemar_30
    @lemar_30 Автор вопроса
    sim3x,
    [29/Jun/2019 21:31:19] "GET / HTTP/1.1" 200 5141
    [29/Jun/2019 21:31:34] "GET /static/music/mushroom.mp3 HTTP/1.1" 200 3989504
    Traceback (most recent call last):
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    [29/Jun/2019 21:31:34] "GET /static/music/LeMar2.mp3 HTTP/1.1" 200 3948544
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 279, in write
    self._write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 803, in write
    self._sock.sendall(b)
    Traceback (most recent call last):
    ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключение
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
    [29/Jun/2019 21:31:34] "GET /static/music/mushroom.mp3 HTTP/1.1" 500 59
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 279, in write
    self._write(data)
    ----------------------------------------
    Exception happened during processing of request from ('127.0.0.1', 54402)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 803, in write
    self._sock.sendall(b)
    ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключение
    Traceback (most recent call last):
    [29/Jun/2019 21:31:34] "GET /static/music/LeMar2.mp3 HTTP/1.1" 500 59
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 279, in write
    self._write(data)
    ----------------------------------------
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 803, in write
    self._sock.sendall(b)
    ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключение
    Exception happened during processing of request from ('127.0.0.1', 54403)

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    Traceback (most recent call last):
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 141, in run
    self.handle_error()
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 116, in handle_error
    super().handle_error()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 138, in run
    self.finish_response()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 368, in handle_error
    self.finish_response()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 279, in write
    self._write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 453, in _write
    result = self.stdout.write(data)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 803, in write
    self._sock.sendall(b)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 344, in client_is_modern
    return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
    ConnectionResetError: [WinError 10054] Удаленный хост принудительно разорвал существующее подключение
    TypeError: 'NoneType' object is not subscriptable

    During handling of the above exception, another exception occurred:

    During handling of the above exception, another exception occurred:

    Traceback (most recent call last):
    Traceback (most recent call last):
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 141, in run
    self.handle_error()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 654, in process_request_thread
    self.finish_request(request, client_address)
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 116, in handle_error
    super().handle_error()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 364, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 368, in handle_error
    self.finish_response()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 724, in __init__
    self.handle()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 180, in finish_response
    self.write(data)
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 171, in handle
    self.handle_one_request()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 274, in write
    self.send_headers()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 331, in send_headers
    if not self.origin_server or self.client_is_modern():
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 194, in handle_one_request
    handler.run(self.server.get_app())
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 344, in client_is_modern
    return self.environ['SERVER_PROTOCOL'].upper() != 'HTTP/0.9'
    TypeError: 'NoneType' object is not subscriptable
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 144, in run
    self.close()
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 111, in close
    super().close()

    During handling of the above exception, another exception occurred:

    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\simple_server.py", line 35, in close
    self.status.split(' ',1)[0], self.bytes_sent
    Traceback (most recent call last):
    AttributeError: 'NoneType' object has no attribute 'split'
    ----------------------------------------
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 654, in process_request_thread
    self.finish_request(request, client_address)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 364, in finish_request
    self.RequestHandlerClass(request, client_address, self)
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\socketserver.py", line 724, in __init__
    self.handle()
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 169, in handle
    self.handle_one_request()
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 194, in handle_one_request
    handler.run(self.server.get_app())
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\handlers.py", line 144, in run
    self.close()
    File "D:\study_dj\lib\site-packages\django\core\servers\basehttp.py", line 111, in close
    super().close()
    File "C:\Users\LeMaR\AppData\Local\Programs\Python\Python36\lib\wsgiref\simple_server.py", line 35, in close
    self.status.split(' ',1)[0], self.bytes_sent
    AttributeError: 'NoneType' object has no attribute 'split'
    ----------------------------------------