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

NameError: name 'method_decorator' is not defined #15

Open
dronov-dmitry opened this issue Jan 21, 2020 · 2 comments
Open

NameError: name 'method_decorator' is not defined #15

dronov-dmitry opened this issue Jan 21, 2020 · 2 comments

Comments

@dronov-dmitry
Copy link

dronov-dmitry commented Jan 21, 2020

File "/home/kat/MEGA/05_Python/05_django_flask/03_HVAC_API/payment/views.py", line 38, in <module>
    @method_decorator(csrf_exempt, name='dispatch')
NameError: name 'method_decorator' is not defined

http://i.imgur.com/i7f7Q59.png - get from here
|http://i.imgur.com/m3DEHda.png - dont work in view

@DenisMurynka
Copy link

DenisMurynka commented Feb 24, 2020

@dronov-dmitry Can you tell how solved the problem:
View -unresolved reference ?

@aorzh
Copy link

aorzh commented Jun 23, 2020

I believe it's not defined because you didn't imported it.
from django.utils.decorators import method_decorator

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