I have a sample class below, but when i run manage.py syncdb, none of the index below gets created. There is also a whole load of confusion in the internet that i wonder if i should be using "Meta" or "MongoMeta" (tried both).
What is the proper way to allow automatic index creation in Django-nonrel with mongodb
class Item (models.Model) : xxx xxx . .
class MongoMeta:
unique_together = [("CountryRetailer", "ProductId")]
indexes = [
[('CountryRetailer',1)],
[('ProductId',1)],
[('OnlineRetailerName',1)],
[('UniqueKey', 1)],
[('Type',1), ('PriceValue',1)],
[('CreatedOn', -1)]
You have to add
django_mongodb_engineinINSTALLED_APPSto make it work.