I am having a little trouble with importing initial data through xml files. For example I name this file in myapp/fixtures/initial_data.xml:
<?xml version="1.0" encoding="UTF-8"?>
<rows>
<row>
<model>myapp.nutrition</model>
<name>Asiago Cheese Bagel</name>
<calories>370</calories>
<protein >17</protein >
<carbs>56</carbs>
<fats>8</fats>
<restaurant >Au Bon Pain</restaurant >
<price>1.29</price>
</row>
</rows>
And this is what my model file looks like:
from django.db import models
class Nutrition(models.Model):
name= models.CharField(max_length=100)
calories= models.IntegerField()
protein= models.IntegerField()
carbs= models.IntegerField()
fats= models.IntegerField()
restaurant= models.CharField(max_length=100)
price= models.DecimalField(decimal_places=2, max_digits=10)
When I run manage.py loaddata myapp/fixtures/initial_data.xml, I get: Installed 0 object(s) from 0 fixture(s). I have also tried JSON and got the same result. Any ideas?