Created
February 6, 2015 15:23
-
-
Save sivy/c7819ac97b52cb3292af to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
[Fri Feb 06 14:29:06.602584 2015] [:error] tables.DataTableView.__init__(self, workflow.request) | |
[Fri Feb 06 14:29:06.602613 2015] [:error] File "/usr/lib/python2.7/dist-packages/horizon/tables/views.py", line 29, in __init__ | |
[Fri Feb 06 14:29:06.602642 2015] [:error] super(MultiTableMixin, self).__init__(*args, **kwargs) | |
[Fri Feb 06 14:29:06.602670 2015] [:error] TypeError: __init__() takes exactly 1 argument (2 given) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
( | |
<class 'pce_project_attributes.overrides.workflows.CustomAttributesStep'>, | |
<class 'pce_project_attributes.overrides.workflows.DataTableStep'>, | |
<class 'horizon.workflows.base.Step'>, | |
<class 'horizon.tables.views.DataTableView'>, | |
<class 'horizon.tables.views.MultiTableView'>, | |
<class 'horizon.tables.views.MultiTableMixin'>, ### DIES | |
<class 'django.views.generic.base.TemplateView'>, | |
<class 'django.views.generic.base.TemplateResponseMixin'>, | |
<class 'django.views.generic.base.ContextMixin'>, | |
<class 'django.views.generic.base.View'>, <type 'object'> | |
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
class MultiTableMixin(object): | |
"""A generic mixin which provides methods for handling DataTables.""" | |
data_method_pattern = "get_%s_data" | |
def __init__(self, *args, **kwargs): | |
super(MultiTableMixin, self).__init__(*args, **kwargs) | |
# [...] | |
class MultiTableView(MultiTableMixin, generic.TemplateView): | |
pass # no __init__() | |
class DataTableView(MultiTableView): | |
pass # no __init__() | |
class Step(object): | |
def __init__(self, workflow): | |
super(Step, self).__init__() | |
# [...] | |
class DataTableStep(workflows.Step, tables.DataTableView): | |
""" | |
A Workflow step that can show a (potentially editable) DataTable. | |
All the real work happens in the subclass, but this sets up the | |
inheritance. | |
""" | |
contributes = () # nada, zilch, bupkiss | |
def __init__(self, workflow): | |
print self.__mro__ | |
super(DataTableStep, self).__init__(workflow) | |
tables.DataTableView.__init__(self, workflow.request) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment