Skip to content

Update csrf_protect_m import for Django 6.0#106

Open
ulgens wants to merge 1 commit intoSiege-Software:mainfrom
ulgens:django6.0-csrf_protect_m-import
Open

Update csrf_protect_m import for Django 6.0#106
ulgens wants to merge 1 commit intoSiege-Software:mainfrom
ulgens:django6.0-csrf_protect_m-import

Conversation

@ulgens
Copy link

@ulgens ulgens commented Oct 22, 2025

Proposed changes

Django 6.0 removes contrib.auth.admin.csrf_protect_m: https://github.com/django/django/pull/18466/files

This PR updates an import of the removed decorator to a still-existing one.

Types of changes

What types of changes does your code introduce to DjangoTypesense?
Put an x in the boxes that apply

  • Bugfix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation Update (if none of the other choices apply)

Checklist

  • I have read the CONTRIBUTING doc
  • Lint and unit tests pass locally with my changes
    • Current main doesn't pass pre-commit checks
  • I have added tests that prove my fix is effective or that my feature works
    • I can update the test matrix but it seems there are multiple EOL Python / Django versions in it. I'm worried that a simple addition of Django 6.0 won't cut it.
  • I have added necessary documentation (if appropriate)
  • Any dependent changes have been merged and published in downstream modules

@EricOuma
Copy link
Contributor

Hey @ulgens
I have removed Python 3.8 support. Please pull the new main to your branch.

Does your change support the Django versions in https://github.com/Siege-Software/django-typesense/blob/main/.github/workflows/build.yml

@ulgens
Copy link
Author

ulgens commented Oct 23, 2025

@EricOuma Hey, if you mean #108 it's not merged yet. I'll rebase my branch from the latest main when it's merged, thank you.

@ulgens ulgens force-pushed the django6.0-csrf_protect_m-import branch from 3931f8a to bd8799f Compare October 24, 2025 19:17
@ulgens
Copy link
Author

ulgens commented Oct 25, 2025

@EricOuma

Does your change support the Django versions in https://github.com/Siege-Software/django-typesense/blob/main/.github/workflows/build.yml

The import path I use in the PR was added 16 years ago: django/django@4bff194 I think it's perfectly safe to use, even for Django 3.2

@ulgens
Copy link
Author

ulgens commented Nov 19, 2025

@EricOuma Hey 👋🏻 Any chance to revisit this?

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