> It seems like a good idea. However, it leads us to another question. Do
we really need the is_staff field on the User Model if it is deprecated?
User.is_staff is still used, just from Adminsite.has_permission instead:
https://github.com/django/django/blob/main/django/contrib/admin/sites.py#L196
> Thoughts on deprecating it?
It seems like a good idea. However, it leads us to another question. Do we
really need the is_staff field on the User Model if it is deprecated?
From: django-developers@googlegroups.com
On Behalf Of Timothy McCurrach
Sent: Tuesday, March 9, 2021 3:22 PM
To:
staff_member_required feels like a bit of a relic from the past:
- It looks like before a massive refactor of the admin that happened 12
years ago (
https://github.com/django/django/commit/a19ed8aea395e8e07164ff7d85bd7dff2f24edca)
staff_member_required played a similar role to what
On 09/03/2021 18.03, Carlton Gibson wrote:
Do you want to open a PR with suggested changes as a focus for discussion?
I would open a PR that improves the docs, but I still don't understand
the difference, so I wouldn't know what to write.
The other alternative would be remove one of them,
Hey Tobias.
OK, it looks like I need to review it in more depth. Possibly it does all
make sense, but the staff_member_required docs don’t read how I’d expect
them to from this conversation.
Do you want to open a PR with suggested changes as a focus for discussion?
Kind regards,
Carlton
On
I checked the git logs and learned about a neat git feature:
git log -L ':staff_member_required:django/contrib/admin/views/decorators.py
git log -L ':admin_view:django/contrib/admin/sites.py
(requires `*py diff=python` in .gitattributes)
The last commit to admin_view was in 2009. The last
Hi.
> On 9 Mar 2021, at 14:33, Tobias Bengfort wrote:
>
> According to [0] ...
>
> [0]
> https://docs.djangoproject.com/en/3.1/ref/contrib/admin/#the-staff-member-required-decorator
Those docs are unchanged since they were added 6 years ago.
Hi,
On Tue, 9 Mar 2021 at 11:04, Carlton Gibson wrote:
> I’ve always taken it that @staff_member_required is for decorating
> views that aren’t part of the admin, and so not accessed via
> AdminSite.get_urls().
On 09/03/2021 13.21, Adam Johnson wrote:
admin_view does extra stuff like calling
I re-submitted my proposal through the "contact the foundation" form (
https://www.djangoproject.com/contact/foundation/ ) since that is the only
way I know of contacting the board.
On Mon, 8 Mar 2021 at 08:09, Florian Apolloner
wrote:
> Mhm, I expected such an answer when I hit send :) I maybe
admin_view does extra stuff like calling the admin site's get_permission
method and using the admin login page rather than the default auth one:
https://github.com/django/django/blob/98d3fd61026457a435ef5b7afce6b6e64e9f241d/django/contrib/admin/sites.py#L198
It should indeed be used only for
Hi Tobias.
I’ve always taken it that @staff_member_required is for decorating views that
aren’t part of the admin, and so not accessed via AdminSite.get_urls().
I don’t think I’d use AdminSite.admin_view() outside of the context in the
example there.
I can’t think why one would do that… 樂 —
Hi,
while reading the documentation on django's admin site I noticed there
are two mechanisms to check for authentication: AdminSite.admin_view[0]
and staff_member_required[1]. I am not sure when I should use which of them.
So what is the difference between the two? I expect that
Hi all,
Mariusz renamed the branches this morning and merged the corresponding pull
requests. Thank you!
Please let us know if you spot problems so they can be fixed.
Cheers,
Markus
On Tue, Mar 2, 2021, at 6:05 PM, Markus Holtermann wrote:
> Brief update on this.
>
> The overall tracking
13 matches
Mail list logo