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

Applinks in admin as read_only #94

Merged
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
1 change: 1 addition & 0 deletions django_admin_index/models.py
Original file line number Diff line number Diff line change
Expand Up @@ -86,6 +86,7 @@ def as_list(self, request, include_remaining=True):
"app_label": app.slug,
"admin_url": app_link.link,
"active": request.path.startswith(app_link.link),
"view_only": True,
}
)
active = request.path.startswith(app_link.link)
Expand Down
4 changes: 4 additions & 0 deletions tests/unit/test_app_link.py
Original file line number Diff line number Diff line change
Expand Up @@ -59,6 +59,7 @@ def test_as_list_structure(self):
"name": self.app_link.name,
"app_label": self.app_group.slug,
"admin_url": self.app_link.link,
"view_only": True,
},
)

Expand Down Expand Up @@ -180,6 +181,7 @@ def test_dashboard_active_link_only_delete_permission(self):
"name": self.app_link.name,
"app_label": self.app_group.slug,
"admin_url": self.app_link.link,
"view_only": True,
},
)

Expand Down Expand Up @@ -208,6 +210,7 @@ def test_dashboard_active_link_only_add_permission(self):
"name": self.app_link.name,
"app_label": self.app_group.slug,
"admin_url": self.app_link.link,
"view_only": True,
},
)

Expand Down Expand Up @@ -236,6 +239,7 @@ def test_dashboard_active_link_only_change_permission(self):
"name": self.app_link.name,
"app_label": self.app_group.slug,
"admin_url": self.app_link.link,
"view_only": True,
},
)

Expand Down
Loading