I downloaded a HTML template form and used in my HTML page and getting the data from it.
The function in the view.py associated with it is working.
request.POST.get('name') is returning the text inputted but gives the error on the redirect page.
Function in views.py
def login(request):
if request.method == "POST":
email = request.POST.get('email')
password = request.POST.get('pass')
print(email)
print(password)
return redirect
return render(request, 'taskManagementWebApp_templates/login.html')
Terminal Output when clicked on Button
abc@gmail.com
123456789
Internal Server Error: /login/
Traceback (most recent call last):
File "C:\Users\Akestech\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\handlers\exception.py", line 34, in inner
response = get_response(request)
File "C:\Users\Akestech\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\deprecation.py", line 96, in __call__
response = self.process_response(request, response)
File "C:\Users\Akestech\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\middleware\clickjacking.py", line 26, in process_response
if response.get('X-Frame-Options') is not None:
AttributeError: 'function' object has no attribute 'get'
[16/Oct/2019 12:16:55] "POST /login/ HTTP/1.1" 500 60650
Error on Webrowser Screenshot of Error during the calling of redirect