Ejemplo 1: base de datos django flush
python manage.py flush
Ejemplo 2: eliminar y empezar de nuevo con db django
Delete the sqlite database file (often db.sqlite3) in your django project folder (or wherever you placed it)
Delete everything except __init__.py file from migration folder in all django apps
Make changes in your models (models.py).
Run the command python manage.py makemigrations or python3 manage.py makemigrations
Then run the command python manage.py migrate.
¡Haz clic para puntuar esta entrada!
(Votos: 0 Promedio: 0)