Reputation: 91
I flushed my database to reset my website in my Django Wagtail project and now I cannot add any page to my Wagtail website.
Here you can find the screenshot. There is no option to add pages. Any solutions? Or do I have to create a new project and reset everything?
Upvotes: 0
Views: 172
Reputation: 25292
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
.
Upvotes: 3