Get object by pk

Issue #8 resolved
Andy Mikhaylenko
repo owner created an issue

Currently we can only get an object by key this way:

{{{storage.get(SomeModel, key)}}}

This is not evident for beginners and should be documented.

We may also want something closer to Django's {{{SomeModel.objects.get(id=1)}}}, e.g. {{{SomeModel.query(storage).by_key(1)}}} (because Model.query is a method, not query manager).

Comments (3)

  1. Log in to comment