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

Return to preserved filters on change_list after object action #88

Merged
merged 3 commits into from
Apr 12, 2018
Merged

Return to preserved filters on change_list after object action #88

merged 3 commits into from
Apr 12, 2018

Conversation

architux
Copy link
Contributor

If you want to filter change_list by some conditions, then open each object and run some object action there, you will be returned to change_list with the same preserved filters.

Fix #83

If you want to filter change_list by some conditions,
then open each object and run some object action there,
you will be returned to change_list with the same preserved filters.

Fix #83
Copy link
Owner

@crccheck crccheck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@@ -1,17 +1,19 @@
{% extends "admin/change_form.html" %}

{% load admin_urls %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you change this to be {% load add_preserved_filters from admin_urls %}. This reduces the "magic" that happens when you load templatetags of not knowing which template tag came from where.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed.


{% block object-tools-items %}
{% for tool in objectactions %}
{% for tool in objectactions %}
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

what's this whitespace style from?

Copy link
Contributor Author

@architux architux Apr 11, 2018

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It's natural for me to use 4-space indentation. It seems that you use 2-space indentation in templates, so I'll fix it.

But at the same time you've originally indented {% for k, v in tool.custom_attrs.items %} block and class="{{ tool.standard_attrs.class }}" with 9 and 11 spaces. Should I use 8 and 10 spaces there?

P.S. I've reverted indentation to original style. If something's wrong - please reply in comment.

@crccheck
Copy link
Owner

not sure why TravisCI isn't running

@coveralls
Copy link

coveralls commented Apr 11, 2018

Coverage Status

Coverage remained the same at 98.113% when pulling b90a7c8 on vmm86:add-preserved-filters into a390027 on crccheck:master.

Copy link
Owner

@crccheck crccheck left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

nice, and TravisCI ran this time too

@crccheck crccheck merged commit fb90869 into crccheck:master Apr 12, 2018
@architux architux deleted the add-preserved-filters branch April 12, 2018 06:48
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.

3 participants