-
Notifications
You must be signed in to change notification settings - Fork 6
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
refactor item detail templates #206
Conversation
looks good to me. |
|
||
@register.assignment_tag | ||
def get_item_delete_url(item): | ||
return get_item_url(item, 'delete') |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Why are there all these additional tags? We can just use {% get_item_url object 'delete' as delete_url %}
, right?
# Conflicts: # apps/budgeting/templates/meinberlin_budgeting/proposal_detail.html # apps/ideas/templates/meinberlin_ideas/idea_detail.html # apps/mapideas/templates/meinberlin_mapideas/mapidea_detail.html
LGTM, too. I feel that some documentation (how does this work, what conventions should I follow, why was this approach chosen over others) would be a good addition, but that can be done separately. |
Next steps would be to do the same with the create/update forms and possibly the delete view.
Right now, the
get_item_add_permission
tag is useless as there is no item to get the app_label/model_name. I felt it was out of scope of this pull request to get a solution for that one because this permission is only used in the list-view which ain't topic of this PR.