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

HttpResponsePermanentRedirect missing in django.shortcuts #210

Closed
SRChiP opened this issue Oct 18, 2019 · 1 comment · Fixed by #211
Closed

HttpResponsePermanentRedirect missing in django.shortcuts #210

SRChiP opened this issue Oct 18, 2019 · 1 comment · Fixed by #211
Labels
bug Something isn't working

Comments

@SRChiP
Copy link
Contributor

SRChiP commented Oct 18, 2019

Bug report

What's wrong

I get an issue:
error: Module 'django.shortcuts' has no attribute 'HttpResponsePermanentRedirect'; maybe "HttpResponseRedirect"?.

It seems that HttpResponseRedirect is defined in django.shortcuts, but not HttpResponsePermanentRedirect.

How is that should be

No errors when running mypy

System information

  • OS: ArchLinux
  • python version: 3.7.4
  • django version: 2.2.5
  • mypy version: 0.730
  • django-stubs version: 1.2.0
@SRChiP SRChiP added the bug Something isn't working label Oct 18, 2019
@sobolevn
Copy link
Member

@SRChiP would you like to submit a PR with the fix, please?

voidus pushed a commit to voidus/django-stubs that referenced this issue Apr 23, 2024
- `django.template.loader.get_template` returns `django.template.base.Template`.
- `django.template.loader.select_template` returns `django.template.base.Template`.
- `django.template.utils.EngineHandler.__iter__` returns an iterator of `django.template.backends.base.BaseEngine`.
- `django.template.utils.get_app_template_dirs` returns a tuple of `pathlib.Path`.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Development

Successfully merging a pull request may close this issue.

2 participants