Hi, i have add \_\_getitem\_\_ method for ModelBase class, so i can to write Model[id] instead of Model.objects.get_by_id(), Although the modification is small, but I think it is useful. Already test passed.
Thank you for create this repo, it's really nice.
from redisco import models
class Person(models.Model):
name = models.Attribute(required=True, unique=True, indexed=True)
Person(name="debugger").save()
p = Person.objects.filter(name="debugger").first()
print p.id
print Person.objects.get_by_id(p.id)
# short code for above
print Person[p.id]
Hi, i have add
\_\_getitem\_\_
method for ModelBase class, so i can to writeModel[id]
instead ofModel.objects.get_by_id()
, Although the modification is small, but I think it is useful. Already test passed.Thank you for create this repo, it's really nice.