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

Generic view does not support the "HEAD" method. #1956

Open
nikolaysm opened this issue Apr 9, 2024 · 0 comments
Open

Generic view does not support the "HEAD" method. #1956

nikolaysm opened this issue Apr 9, 2024 · 0 comments

Comments

@nikolaysm
Copy link
Contributor

if self.request.method == 'GET':

As Django's default handling of the HEAD method as GET, it would be beneficial to include data in the form even when a HEAD method is requested to align with Django's expected behavior.

To support HEAD method we can do:
if self.request.method in ['GET', 'HEAD']:

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

1 participant