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

add support for LoginRequiredMiddleware with login_not_required decor… #2005

Merged
merged 1 commit into from
Sep 17, 2024

Conversation

dulmandakh
Copy link
Contributor

@dulmandakh dulmandakh commented Sep 17, 2024

Description

This PR adds support for LoginRequiredMiddleware introduced in Django 5.1, or views provided by this package don't require login.

Checklist:

  • I have added the relevant tests for this change.
  • I have added an item to the Pending section of docs/changes.rst.

Copy link
Member

@matthiask matthiask left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks for working on this!

Here's an example of an app adding support for login_not_required while actually testing the behavior:
matthiask/django-authlib@2239a1c

tests/urls.py Outdated Show resolved Hide resolved
debug_toolbar/decorators.py Outdated Show resolved Hide resolved
docs/changes.rst Outdated Show resolved Hide resolved
tests/test_login_not_required.py Outdated Show resolved Hide resolved
@dulmandakh
Copy link
Contributor Author

Thanks for working on this!

Here's an example of an app adding support for login_not_required while actually testing the behavior: matthiask/django-authlib@2239a1c

I contributed same support for Django OAuth Toolkit in jazzband/django-oauth-toolkit#1454. Thanks for the reference.

@dulmandakh
Copy link
Contributor Author

@matthiask please review and merge if this PR looks good

@matthiask matthiask merged commit 8ccfc27 into django-commons:main Sep 17, 2024
25 checks passed
@matthiask
Copy link
Member

Thanks!

@dulmandakh dulmandakh deleted the login_not_required branch September 17, 2024 22:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants