2👍
✅
timestamp = IntField(blank=True, null=True)
but its better to use
timestamp = DateTimeField(blank=True, null=True)
as its a timestamp
0👍
IntergerField
is not valid, use IntField
instead.
user_id = IntField(blank=True, null=True)
Ref: http://docs.mongoengine.org/apireference.html#mongoengine.fields.IntField
- [Answered ]-How do you add a unique field (non empty) field to an existing model in Django?
- [Answered ]-Guest Checkout in django
- [Answered ]-Get the username from user ID in django models
- [Answered ]-Static fiels doesn't load in django 1.11
Source:stackexchange.com