Did I find the right examples for you? yes no

All Samples(9)  |  Call(9)  |  Derive(0)  |  Import(0)

src/e/s/ESP-Website-HEAD/esp/esp/program/models/class_.py   ESP-Website(Download)
            capacity_factor = 0.75
        return capacity_factor
    get_capacity_factor.depend_on_row(lambda: Tag, lambda tag: {}, lambda tag: tag.key == 'nearly_full_threshold')
    get_capacity_factor = staticmethod(get_capacity_factor)

src/e/s/ESP-Website-HEAD/esp/esp/accounting_docs/models.py   ESP-Website(Download)
            return new_doc
    get_DOCTYPE.depend_on_row(lambda: Document, lambda doc: {'user': doc.user})
    get_DOCTYPE.depend_on_row(lambda: LineItem, lambda item: {'user': item.user})
    get_DOCTYPE = staticmethod(get_DOCTYPE)
    #   This will be invalidated when a balance is posted to a transaction because doing so
    #   modifies line items associated with the transaction.
    get_completed.depend_on_row(lambda: Document, lambda doc: {'user': doc.user})
    get_completed.depend_on_row(lambda: LineItem, lambda item: {'user': item.user})
    get_completed = staticmethod(get_completed)

src/e/s/ESP-Website-HEAD/esp/esp/program/models/__init__.py   ESP-Website(Download)
        return regProf
    getLastProfile.depend_on_row(lambda:RegistrationProfile, lambda profile: {'user': profile.user})
    getLastProfile = staticmethod(getLastProfile) # a bit annoying, but meh
    # Thanks to our attempts to be smart and steal profiles from other programs,
    # the cache can't depend only on profiles with the same (user, program).
    getLastForProgram.depend_on_row(lambda: RegistrationProfile, lambda rp: {'user': rp.user})
    getLastForProgram = staticmethod(getLastForProgram)

src/e/s/ESP-Website-HEAD/esp/esp/cache/test.py   ESP-Website(Download)
            a += 5
        return AnnouncementLink.objects.get(id=a_id).title + " " + Entry.objects.get(id=e_id).title + str(a)
    sum_stuff_static.depend_on_row(AnnouncementLink, 'a_id')
    sum_stuff_static.depend_on_row(Entry, 'e_id')
    # This kind of works, except that you lose access to generated API