Skip to content

Commit bbbb44a

Browse files
committed
fixes changelist template
1 parent cc48ce4 commit bbbb44a

File tree

7 files changed

+27
-17
lines changed

7 files changed

+27
-17
lines changed

docs/src/install.md

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,19 @@
11
# Install
22

3+
```shell
34

4-
pip install django-admin-extra-buttons
5+
pip install django-admin-extra-buttons
6+
7+
```
58

69

710
After installation add it to ``INSTALLED_APPS``
811

9-
INSTALLED_APPS = (
10-
...
11-
'admin_extra_buttons',
12-
)
12+
```python
13+
14+
INSTALLED_APPS = (
15+
...
16+
'admin_extra_buttons',
17+
)
18+
19+
```

mkdocs.yml

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,8 @@ markdown_extensions:
2323
# - pymdownx.blocks.caption
2424
# - pymdownx.details
2525
# - pymdownx.snippets
26+
- pymdownx.details
27+
- pymdownx.magiclink
2628
- pymdownx.superfences:
2729
custom_fences:
2830
- name: mermaid

src/admin_extra_buttons/api.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,2 +1,4 @@
1-
from .decorators import button, choice, link, view # noqa: F401
2-
from .mixins import ExtraButtonsMixin, confirm_action # noqa: F401
1+
from .decorators import button, choice, link, view
2+
from .mixins import ExtraButtonsMixin, confirm_action
3+
4+
__all__ = ["ExtraButtonsMixin", "button", "choice", "confirm_action", "link", "view"]

src/admin_extra_buttons/templates/admin_extra_buttons/change_form.html

Lines changed: 0 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -3,8 +3,3 @@
33
{{ block.super }}
44
{% include "admin_extra_buttons/includes/change_form_buttons.html" %}
55
{% endblock object-tools-items %}
6-
{# {% block admin_change_form_document_ready %}{{ block.super }} #}
7-
{# <script> #}
8-
{# #}
9-
{# </script> #}
10-
{# {% endblock %} #}
Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,11 @@
11
{% extends "admin/change_list.html" %}{% load extra_buttons %}
22
{% block object-tools-items %}
3-
{# {% for n in cl.model_admin.names %}<div>{{ n }}</div>{% endfor %} #}
4-
{{ block.super }}
5-
{% include "admin_extra_buttons/includes/change_list_buttons.html" %}
3+
{% if has_add_permission %}
4+
{{ block.super }}
5+
{% include "admin_extra_buttons/includes/change_list_buttons.html" %}
6+
{% else %}
7+
<a href="#" class="addlink" style="display: none"></a>
8+
{% include "admin_extra_buttons/includes/change_list_buttons.html" %}
9+
{% endif %}
10+
611
{% endblock object-tools-items %}

tests/test_choices.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,6 @@ def test_choice_adv(app, demomodel5, admin_user):
3939
choice = res.pyquery("select[name=_menu_adv]")
4040
assert not choice
4141

42-
4342
demomodel5.name = "test21"
4443
demomodel5.save()
4544
res = app.get(url, user=admin_user)

tox.ini

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ env_list =
99
type
1010
pkg_meta
1111
d{42, 32}-py{39}
12-
d{52}-py{313}
12+
d{52}-py{310}
1313
skip_missing_interpreters = true
1414

1515
[testenv]

0 commit comments

Comments
 (0)