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

Enable support for Django 3.2 #15

Open
tasawernawaz opened this issue Sep 3, 2021 · 4 comments
Open

Enable support for Django 3.2 #15

tasawernawaz opened this issue Sep 3, 2021 · 4 comments

Comments

@tasawernawaz
Copy link

I'm interested in contributing to the edX open-source project. I was wondering if you guys have a plan to upgrade this package to make it compatible with Django 3.2.

I am happy to help if needed.

You can find the associated edX Django upgrade Github issues here.

@jpic
Copy link

jpic commented Nov 24, 2021

This works if you're looking for contextvars, but I wonder what problem you have with Django 3.2, django-threadlocals seems to be working fine for me ...

from contextvars import ContextVar

context_request = ContextVar('request')


def middleware(get_response):
    def middleware(request):
        token = context_request.set(request)
        response = get_response(request)
        context_request.reset(token)
        return response
    return middleware

@benrobster
Copy link
Owner

benrobster commented Nov 24, 2021 via email

@tasawernawaz
Copy link
Author

@benrobster sure thing, please transfer its ownership and I will try to upgrade it to match django 3.2 if it requires any modification.

@jpic
Copy link

jpic commented Nov 25, 2021 via email

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

No branches or pull requests

3 participants