10👍
✅
That’s tricky. The only solution I can think of is the following:
1: First, create a migration that allows the slug field to be nullable
2: Then, create another migration that will populate the field for every row
3: Lastly, create a migration that makes the field non-nullable.
Hope it helps
15👍
There is an easier way:
- Find migration where you have initially add slug field
- Add default value to slug field
- Unapply last migration
- Remove default value from initial slug field migration
👤ar7n
- "Error: That IP address can't be assigned-to" when running app
- Problem using Django admin Actions with intermediate pages
- Reverse() argument after ** must be a mapping
Source:stackexchange.com