Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fix __init__() got an unexpected keyword argument 'template_name' error #397

Merged
merged 1 commit into from Apr 21, 2015

Conversation

thraxil
Copy link
Contributor

@thraxil thraxil commented Apr 21, 2015

See: https://sentry.ccnmtl.columbia.edu/sentry-internal/dmt/group/663/

The problem is that the RangeOffsetMixin has an __init__(), which overrides the
__init__() of the generic Django CBVs that lets you specify additional
parameters when you instantiate it in urls.py. That's what we do for
the project board view, since it uses the same data as the regular
project detail view, we just re-use that view and specify a different
template_name in urls.py.

Removed the __init__() from RangeOffsetMixin and just explicitly call
calc_interval() instead.'

The problem is that the `RangeOffsetMixin` has an `__init__()`, which overrides the
`__init__()` of the generic Django CBVs that lets you specify additional
parameters when you instantiate it in `urls.py`. That's what we do for
the project board view, since it uses the same data as the regular
project detail view, we just re-use that view and specify a different
`template_name` in `urls.py`.

Removed the `__init__()` from `RangeOffsetMixin` and just explicitly call
`calc_interval()` instead.'
nikolas added a commit that referenced this pull request Apr 21, 2015
fix __init__() got an unexpected keyword argument 'template_name' error
@nikolas nikolas merged commit db1ec07 into master Apr 21, 2015
@nikolas nikolas deleted the board-view-template-name-bugfix branch April 21, 2015 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants