GithubHelp home page GithubHelp logo

chaaat_backend's Introduction

ChaaAt(backend)

后端部署(Windows 下开发部署)

python -m venv venv # 创建虚拟环境
venv\Scripts\activate # 激活虚拟环境
pip install -r requirements.txt # 安装依赖

在 ChaaAt_backend 目录下新建 secretsettings.py

# secretsettings.py:

SECRET_KEY = 'x&q5tl2ehmw2s(j15$qb(()o4ooati&h=li5ds1n0lvp+xhf^m'
# 生产部署请替换为自己的SECRET_KEY
# 否则攻击者可能得以执行任意代码
python manage.py migrate # 初始化数据库
python manage.py runserver # 运行开发服务器

chaaat_backend's People

Watchers

 avatar

chaaat_backend's Issues

运行python manage.py migrate 报错

我模块都装上了。不知道为啥这里会报错,大佬帮帮忙

related_val: tuple[int, ...]
TypeError: 'type' object is not subscriptable

完整:

(venv) G:\Html_project\LoveCards\index\chat>python manage.py migrate
Traceback (most recent call last):
  File "manage.py", line 22, in <module>
    main()
  File "manage.py", line 18, in main
    execute_from_command_line(sys.argv)
  File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
    utility.execute()
  File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\core\management\__init__.py", line 395, in execute
    django.setup()
  File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\__init__.py", line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\apps\registry.py", line 114, in populate
    app_config.import_models()
  File "G:\Html_project\LoveCards\index\chat\venv\lib\site-packages\django\apps\config.py", line 301, in import_models
    self.models_module = import_module(models_module_name)
  File "G:\Python\lib\importlib\__init__.py", line 127, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 1014, in _gcd_import
  File "<frozen importlib._bootstrap>", line 991, in _find_and_load
  File "<frozen importlib._bootstrap>", line 975, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 671, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 783, in exec_module
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File "G:\Html_project\LoveCards\index\chat\index\models.py", line 8, in <module>
    from drfutils.models import RelatedManager
  File "G:\Html_project\LoveCards\index\chat\drfutils\models.py", line 10, in <module>
    class RelatedManager(Manager[_M]):
  File "G:\Html_project\LoveCards\index\chat\drfutils\models.py", line 15, in RelatedManager
    related_val: tuple[int, ...]
TypeError: 'type' object is not subscriptable

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.