资源简介

python3 Django2前端后端代码

【调试步骤】

打开cmd,cd到当前程序目录

输入 python manage.py runserver 

回车即可测试

资源截图

代码片段和文件信息

#!/usr/bin/env python
import os
import sys

if __name__ == “__main__“:
    os.environ.setdefault(“DJANGO_SETTINGS_MODULE“ “dfyblog2.settings“)
    try:
        from django.core.management import execute_from_command_line
    except ImportError:
        # The above import may fail for some other reason. Ensure that the
        # issue is really that Django is missing to avoid masking other
        # exceptions on Python 2.
        try:
            import django
        except ImportError:
            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?“
            )
        raise
    execute_from_command_line(sys.

 属性            大小     日期    时间   名称
----------- ---------  ---------- -----  ----
     目录           0  2019-05-12 22:38  blog\
     文件           0  2018-01-10 21:26  blog\__init__.py
     目录           0  2019-05-12 22:47  blog\__pycache__\
     文件         134  2018-01-10 21:41  blog\__pycache__\__init__.cpython-36.pyc
     文件         631  2018-01-13 12:29  blog\__pycache__\admin.cpython-36.pyc
     文件         801  2018-01-12 10:38  blog\__pycache__\models.cpython-36.pyc
     文件         505  2019-05-12 22:47  blog\__pycache__\urls.cpython-36.pyc
     文件        2204  2018-01-14 11:18  blog\__pycache__\views.cpython-36.pyc
     文件         518  2018-01-13 12:29  blog\admin.py
     文件          83  2018-01-12 10:06  blog\apps.py
     目录           0  2019-05-12 22:38  blog\migrations\
     文件         627  2018-01-10 22:15  blog\migrations\0001_initial.py
     文件           0  2018-01-10 21:26  blog\migrations\__init__.py
     目录           0  2019-05-12 22:38  blog\migrations\__pycache__\
     文件         735  2018-01-10 22:15  blog\migrations\__pycache__\0001_initial.cpython-36.pyc
     文件         145  2018-01-10 21:41  blog\migrations\__pycache__\__init__.cpython-36.pyc
     文件         526  2018-01-12 10:38  blog\models.py
     目录           0  2019-05-12 22:38  blog\static\
     目录           0  2019-05-12 22:38  blog\static\calendar\
     目录           0  2019-05-12 22:38  blog\static\calendar\css\
     文件        2592  2018-01-14 14:24  blog\static\calendar\css\calendar.css
     目录           0  2019-05-12 22:38  blog\static\calendar\js\
     文件        7359  2017-05-17 16:18  blog\static\calendar\js\calendar.js
     文件       95962  2017-05-17 16:18  blog\static\calendar\js\jquery.min.js
     目录           0  2019-05-12 22:38  blog\static\css\
     文件         493  2018-01-13 19:55  blog\static\css\edit.css
     目录           0  2019-05-12 22:38  blog\static\css\images\
     文件      785641  2018-01-13 11:13  blog\static\css\images\2.jpg
     文件      785641  2018-01-13 14:50  blog\static\css\images\background3.jpg
     文件       13350  2018-01-13 22:04  blog\static\css\images\logo.png
     文件        2718  2018-01-14 11:28  blog\static\css\ran.css
............此处省略45个文件信息

评论

共有 条评论