Comments (2)
and even simpler http://repl.it/3qC/5
from functools import partial
def secret_decorator(func):
def inner(self):
print 'decorated'
func(self)
from functools import partial
class Desc(object):
def __call__(self): func(self)
def __get__(self, instance): return partial(func, instance)
inner.original = Desc()
return inner
class Base(object):
@secret_decorator
def method(self):
print('base')
class Child(Base):
@secret_decorator
def method(self):
print('child')
# bypass super/secret_decorator and directly call method impl
super(Child, self).method.original()
base, child = Base(), Child()
base.method()
child.method()
from django-fsm.
Implemented in the viewflow.fsm
package
https://docs-next.viewflow.io/fsm/inheritance.html
from django-fsm.
Related Issues (20)
- State changing through a management command HOT 1
- Do there any blockers to bump new release? HOT 7
- How to handle `can_proceed(transition) == False` HOT 1
- Future support HOT 1
- auto-save workflow state HOT 8
- Support for Django 4.0 HOT 1
- documentation request HOT 1
- any new update in django-fsm HOT 1
- How can I have multiple workflows in the same template? HOT 4
- Question: How to resolve ConcurrentTransition(βCannot save object! The state has been changed since fetched from the database!β) issue ? HOT 1
- GitHub releases HOT 2
- Support for Django 4.0 when drawing transitions HOT 1
- graph_transitions: TypeError: expected string or bytes-like object HOT 3
- Update package to support Django 4 HOT 4
- No active CI for the builds HOT 7
- graph_transitions raise exception > TypeError: requires_system_checks must be a list or tuple HOT 6
- django_fsm.TransitionNotAllowed HOT 1
- Allowing incorrect state transitions HOT 3
- Releasing new version HOT 13
- Question: How to deal with async errors of side effects HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
π Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. πππ
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google β€οΈ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from django-fsm.