You don't have to create a whole new project, but I'd suggest deleting and recreating the database - the initial migrations to set up the Wagtail database tables include a few essential records (such as a root node for the page tree), and these will have been deleted when you flushed the database.
If you're running sqlite (the default for a new project), there'll be a file in the project root named db.sqlite3
, or with a name of the form [name-of-project].db
- delete this file, then re-run ./manage.py migrate
.
If you're using PostgreSQL, run dropdb name-of-project
then createdb name-of-project
(you might also need an option like -U postgres
depending on how your permissions are set up), then ./manage.py migrate
.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.