In a new django project, after setting up your models and views, you probably are eager to test out some of your apps behaviour with non static content. You can add models manually via the django admin panel. However this is probably a very time consuming task if your app is'nt super small.
Django autofixtures to the rescue!
Installing and setting up django-autofixtures
Installing and populating your database with test data is super easy:
pip install django-autofixtures
- Make sure you add
INSTALLED_APPSto use the management commands.
- Fill up your database with the management command:
python manage.py loadtestdata app.MyModel:10
Where the number after the colon represent how many instances of the model you want to add.
For further reading check out the github page!