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

Notifications editor in Django Admin: can't create new product notifications #9340

Closed
tomaszn opened this issue Jan 16, 2024 · 0 comments
Closed
Labels

Comments

@tomaszn
Copy link
Contributor

tomaszn commented Jan 16, 2024

#9193 introduced a notifications editor for admins, and it works great for editing existing notifications.

However, this still doesn't allow creating new per-product notifications for other users. Fields user and product are not present in the new/edit admin form.

It is caused by marking these model fields as editable=False. I think, the reason was to hide them from non-product-specific notification settings form.

This can be fixed by making the fields editable, and adding them to excluded in NotificationsForm. Optionally, they could be hidden or made read only for editing existing notifications, so they appear only when a new one is being created.

There are workarounds for this issue, namely using ./manage.py shell to create a notification object manually, or editing the database contents. Then the details can be adjusted in Django Admin.

@tomaszn tomaszn added the bug label Jan 16, 2024
@tomaszn tomaszn closed this as completed Jan 16, 2024
@tomaszn tomaszn reopened this Jan 16, 2024
@tomaszn tomaszn closed this as not planned Won't fix, can't repro, duplicate, stale Jan 16, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

1 participant