This is the backend code of the PaperDaily
project based on django2.2
.
-
Install
python3.7
or later -
Copy
model.pt
to the root directory -
Set up the database in
backend/settings.py
-
Install dependencies
$ pip install -r requirements.txt
$ python manage.py runserver 0:8000
if error
File "/home/admin/.local/lib/python3.7/site-packages/django/db/backends/mysql/operations.py", line 146, in last_executed_query
query = query.decode(errors='replace')
AttributeError: 'str' object has no attribute 'decode'
则注释掉该文件的145-146
行
145 # if query is not None:
146 # query = query.decode(errors='replace')
147 return query
目前设置已有的管理员账户为:
'USER': admin
'PASSWORD': se-mcdb-o2e
也可以自行创建管理员账户:
python manage.py createsuperuser