create fixtures django

  1. Create a folder within your Django app directory to store your fixtures, if it does not exist already: mkdir fixtures

  2. Inside the fixtures folder, create a JSON or XML file with the data you intend to use as fixtures for your Django app, for example: touch mydata.json

  3. Open the JSON or XML file using a text editor, and input the data in the appropriate format as required by Django fixtures.

  4. In your Django app, you can then use the python manage.py loaddata <fixture_name> command to load the fixtures into your database.

  5. Finally, you can verify that the fixtures were successfully loaded by checking your database for the newly added data.