简体   繁体   English

Django 尝试运行服务器时出现运行时错误

[英]Django Runtime Error while trying to run server

I am trying to run my Django server via 'python manage.py runserver' on a github repository i cloned and always get this runtime error message:我正在尝试通过“python manage.py runserver”在我克隆的 github 存储库上运行我的 Django 服务器,但总是收到此运行时错误消息:

class AbstractBaseUser(models.Model): class AbstractBaseUser(模型。模型):

RuntimeError: ____class____ not set defining 'AbstractBaseUser' as <'class 'django.contrib.auth.base_user.AbstractBaseUser'>. RuntimeError: ____class____ not set defining 'AbstractBaseUser' as <'class 'django.contrib.auth.base_user.AbstractBaseUser'>。 Was ____classcell____ propagated to type.____new____? ____classcell____ 是否传播到 type.____new____?

Details of installed packages in my virtual environment are: Django 1.9 |我的虚拟环境中安装包的详细信息是:Django 1.9 | django-crispy-forms 1.6.0 | django-crispy-forms 1.6.0 | django-markdown-deux 1.0.5 | django-markdown-deux 1.0.5 | django-pagedown 0.1.1 | django-pagedown 0.1.1 | markdown2 2.3.1 |降价2 2.3.1 | olefile 0.46 |文件 0.46 | Pillow 7.1.1 |枕头 7.1.1 | pip 19.2.3 | pip 19.2.3 | setuptools 41.2.0 |安装工具 41.2.0 |

I am using python version 3.8.1我正在使用 python 版本 3.8.1

please does anyone have any suggestions on how to solve this error.请问有人对如何解决此错误有任何建议吗? Thank you.谢谢你。

First of all, you should try to update your packages to the latest versions, as you are using python 3.8.首先,您应该尝试将软件包更新到最新版本,因为您使用的是 python 3.8。 Check this also: https://docs.djangoproject.com/en/3.0/faq/install/#what-python-version-can-i-use-with-django I don't think Django 1.9 is compatible with python 3.8 Check this also: https://docs.djangoproject.com/en/3.0/faq/install/#what-python-version-can-i-use-with-django I don't think Django 1.9 is compatible with python 3.8

RuntimeError at /save You called this URL via POST, but the URL doesn't end in a slash and you have APPEND_SLASH set. RuntimeError at /save 您通过 POST 调用了这个 URL,但是 URL 没有以斜杠结尾,并且您设置了 APPEND_SLASH。 Django can't redirect to the slash URL while maintaining POST data. Django 在维护 POST 数据时无法重定向到斜杠 URL。 Change your form to point to 127.0.0.1:8000/save/ (note the trailing slash), or set APPEND_SLASH=False in your Django settings.将您的表单更改为指向 127.0.0.1:8000/save/(注意尾部斜线),或在您的 Django 设置中设置 APPEND_SLASH=False。

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM