【django】校易论坛网源码 manage.py 跟 settings.py

#!/usr/bin/env python
"""Django's command-line utility for administrative tasks."""
# 每次改数据库表模型结构 都得重新迁移
# 生成迁移文件 python manage.py makemigrations
# 执行迁移 python manage.py migrate 

# 最后启动服务器 python manage.py runserver


import os
import sys


def main():
    os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'bbspro.settings')
    try:
        from django.core.management import execute_from_command_line
    except ImportError as exc:
        raise ImportError(
            "Couldn't import Django. Are you sure it's installed and "
            "available on your PYTHONPATH environment variable? Did you "
            "forget to activate a virtual environment?"
        ) from exc
    execute_from_command_line(sys.argv)


if __name__ == '__main__':
    main()
=======================================

"""
Django settings for bbspro pro

没有更多推荐了,返回首页

©️2019 CSDN 皮肤主题: 大白 设计师: CSDN官方博客
应支付0元
点击重新获取
扫码支付

支付成功即可阅读