rq / django-rq

A simple app that provides django integration for RQ (Redis Queue)
MIT License
1.81k stars 282 forks source link

Update templates to match with current Django Admin #620

Closed nikhilweee closed 10 months ago

nikhilweee commented 11 months ago

This PR updates templates to better match with those of Django 4.2

nikhilweee commented 11 months ago

@selwin Would be nice to hear your thoughts and hopefully get this merged soon.

selwin commented 11 months ago

Hi @nikhilweee mind attaching a screenshot of before and after?

selwin commented 11 months ago

And how does this change affect Django < 4.2?

nikhilweee commented 11 months ago

This is what /django_rq/queue/ looked like before

image

This is what /django_rq/queue/ looks like after this PR

image

The difference is subtle here, but is more pronounced in the next template


This is what /django-rq/queues/0/scheduled/ looked like before

image

This is what /django-rq/queues/0/scheduled/ looks like after this PR

image

EDIT: I was going crazy over the missing "Empty Queue" button, turns out it was removed in #608

nikhilweee commented 11 months ago

@selwin My changes are based off of the current change_list.html template.

I am not sure about the impact on Django < 4.2, but comparing v3.2.20 to v4.2.4 on GitHub, looks like that page hasn't changed. So I am tempted to say it's safe to assume that this PR should be applicable to both Django 3.2 and 4.2?

https://github.com/django/django/compare/4.2.4...3.2.20

selwin commented 11 months ago

Do you mind testing this change on Django 3.2 at the very least? We don't have unit tests for this so I'd feel much more comfortable if I can see a screenshot of how it looks on older versions.

nikhilweee commented 11 months ago

@selwin Here are results on Django 3.2

django_rq/queue Before this PR

image

django_rq/queue After this PR

image

django_rq/queues/0/scheduled Before this PR

image

django_rq/queues/0/scheduled After this PR

image
nikhilweee commented 10 months ago

Hey @selwin, any thoughts?

selwin commented 10 months ago

Thanks!