如何制作响应式网站,建设网站哪家便宜,苏州建筑公司排名,常用的网页开发技术有哪些关键步骤#xff1a;
第一步#xff1a; 执行#xff1a;python manage.py makemigrations 你的项目名称第二步#xff1a;它会提示你选1还是2#xff0c;这里因为添加字段#xff0c;所以选1第三步#xff1a;出现这个#xff0c;直接输入这个第四步
第一步 执行python manage.py makemigrations 你的项目名称第二步它会提示你选1还是2这里因为添加字段所以选1第三步出现这个直接输入这个第四步 执行python manage.py migrate第五步运行项目python manage.py runserver 本机ip:8000 (.venv) PS D:\python_workpace\django_xitong_shezhi\pythonProject\myproject python manage.py makemigrations myproject
It is impossible to add a non-nullable field title_field22 to yingyongguanli without specifying a default. This is because the database needs something to populate existing rows.
Please select a fix:2) Quit and manually define a default value in models.py.
Select an option: 1
Please enter the default value as valid Python.
The datetime and django.utils.timezone modules are available, so it is possible to provide e.g. timezone.now as a value.‘’
Invalid input: invalid character ‘ (U2018) (string, line 1)Migrations for myproject:myproject\migrations\0002_yingyongguanli_title_field22.py- Add field title_field22 to yingyongguanli
(.venv) PS D:\python_workpace\django_xitong_shezhi\pythonProject\myproject python manage.py migrate
Operations to perform:Apply all migrations: admin, auth, contenttypes, myproject, sessions
Running migrations:Applying myproject.0002_yingyongguanli_title_field22... OK
(.venv) PS D:\python_workpace\django_xitong_shezhi\pythonProject\myproject python manage.py runserver 10.0.4.144:8000
Watching for file changes with StatReloader
Performing system checks...System check identified no issues (0 silenced).
August 07, 2024 - 15:05:12
Django version 5.0.6, using settings myproject.settings
Starting development server at http://10.0.4.144:8000/
Quit the server with CTRL-BREAK.