I hereby claim:
- I am simonwoerpel on github.
- I am simonwoerpel (https://keybase.io/simonwoerpel) on keybase.
- I have a public key ASDWJ9OdauOQzUm_FGJ2ibH6sI7-6Eit9OpLoSiT-Py5Fgo
To claim this, I am signing this object:
from enum import Enum | |
e = Enum("MyEnum", ["name", "name2", "name3"]) | |
# expected behaviour: | |
assert type(e.name) == type(e.name2) == type(e.name3) == e | |
assert e.name.value == 1 | |
assert e.name2.value == 2 | |
assert e.name3.value == 3 |
I hereby claim:
To claim this, I am signing this object:
from django.utils.functional import cached_property | |
class CachedPropertyCBVMixin(object): | |
""" | |
ovverides self.get_object() and self.get_queryset() | |
with cached properties to reduce amount of executed querysets | |
""" | |
@cached_property |
# coding=utf-8 | |
__author__ = 'Simon Wörpel @simonwoerpel simon.woerpel@medienrevolte.de' | |
''' | |
Simple template filter for django to urlize objects, | |
so you could use just | |
{{ object|obj_urlize }} |