Monday, January 17, 2022

Re: Hi, I am learning Django, I am stuck at one place and can't over come after many days

Hi,

Hope you are well

Did you successfully find the bug or not


here is my whatsapp number 
You can contact here
923158090326

Thanks

On Tue, Jan 18, 2022 at 8:32 AM Leo guitar girl <mansarimtabassum@gmail.com> wrote:
Oh, I apologize. I had pasted the error code here don't know why it was not sent. 
Actually, I am trying to create a job portal by seeing a tutorial. Now I am at the step of verifying OTP. OTP is generated successfully in the database. But when I enter it to the textbox and submit, it shows this error

image.png

Please Note: I am getting the submitted email from the database and showing it at the OTP verify page in a read-only field.

Here is the Copy Paste view also of the error message

Environment:


Request Method: POST
Request URL: http://127.0.0.1:8000/otp/

Django Version: 4.0.1
Python Version: 3.9.9
Installed Applications:
['django.contrib.admin',
 'django.contrib.auth',
 'django.contrib.contenttypes',
 'django.contrib.sessions',
 'django.contrib.messages',
 'django.contrib.staticfiles',
 'myapp']
Installed Middleware:
['django.middleware.security.SecurityMiddleware',
 'django.contrib.sessions.middleware.SessionMiddleware',
 'django.middleware.common.CommonMiddleware',
 'django.middleware.csrf.CsrfViewMiddleware',
 'django.contrib.auth.middleware.AuthenticationMiddleware',
 'django.contrib.messages.middleware.MessageMiddleware',
 'django.middleware.clickjacking.XFrameOptionsMiddleware']



Traceback (most recent call last):
  File "C:\Users\jarry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\django\utils\datastructures.py", line 83, in __getitem__
    list_ = super().__getitem__(key)

During handling of the above exception ('email'), another exception occurred:
  File "C:\Users\jarry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\django\core\handlers\exception.py", line 47, in inner
    response = get_response(request)
  File "C:\Users\jarry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\django\core\handlers\base.py", line 181, in _get_response
    response = wrapped_callback(request, *callback_args, **callback_kwargs)
  File "C:\Users\jarry\PycharmProjects\JobPortal\myapp\views.py", line 46, in OTPverify
    email = request.POST['email']
  File "C:\Users\jarry\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.9_qbz5n2kfra8p0\LocalCache\local-packages\Python39\site-packages\django\utils\datastructures.py", line 85, in __getitem__
    raise MultiValueDictKeyError(key)

Exception Type: MultiValueDictKeyError at /otp/
Exception Value: 'email'


Thank You for your support. 

On Mon, Jan 17, 2022 at 1:15 AM Kasper Laudrup <laudrup@stacktrace.dk> wrote:
On 16/01/2022 11.03, Leo guitar girl wrote:
>
> *This is the error I am getting at OTP verification step. Please guide
> me where I am wrong. *
> *

No one here would have any idea what "OTP verification step" you are
talking about.

You haven't written anything about what you are trying to achieve or
shared any relevant code so it's close to impossible for anyone to help you.

So your first step would be to learn how to ask questions in general.
Consider reading something like this:

http://www.catb.org/~esr/faqs/smart-questions.html

Kind regards,

Kasper Laudrup

--
You received this message because you are subscribed to a topic in the Google Groups "Django users" group.
To unsubscribe from this topic, visit https://groups.google.com/d/topic/django-users/P1-fQLDoncc/unsubscribe.
To unsubscribe from this group and all its topics, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/60ef1f71-85b3-0fad-d9b8-ad48139fb01e%40stacktrace.dk.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAN6g9JZ26XSF%3DtQp6%2BXrwx1Av0JV%2BJsUsfkga1mnFtiBumUu8A%40mail.gmail.com.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAL2GMxSDKLUUgEEBvW3Td0YhqEeOPUs0_va38-BYkx5OBDxnNQ%40mail.gmail.com.

No comments:

Post a Comment