I ran into this problem where my mongo database has a field "type" that is a reserved word in Python. How do I go about setting it in Django so that Django knows I'm referring to the field Type in mongo, but without running into an error? Thanks a lot!
# mongo object
payment: {
user = ObjectId("..."),
date: ISODate("2013-05-05T23:21:22.802Z"),
type: "downgrade"
}
# django
class Payment(models.Model):
user = models.ForeignKey(..)
date = models.DateTimeField(default=datetime.datetime.now, null=False)
type = models.CharField(blank=False, max_length=30) # <== cannot use type