1

I'm learning django and while trying to use Signal and receiver, I receive an ImportError. Code:

from django.dispatch import reciever

Error:

  File "C:\Users\krish\Documents\python\django_project\users\signals.py", line 3, in <module>
    from django.dispatch import reciever
ImportError: cannot import name 'reciever' from 'django.dispatch' (C:\Users\krish\Envs\myproject\lib\site-packages\django\dispatch\__init__.py)

I've seen this post and I tried deleting and re-adding the django module(s) but nothing happened. What can I do to fix this and make it work?

I'm using django-2.3 and python 3.7.3

Community
  • 1
  • 1
12944qwerty
  • 2,001
  • 1
  • 10
  • 30

1 Answers1

4

The user misspelled the import statement it happens to everyone. The user had:

 from django.dispatch import reciever

meanwhile it should be:

from django.dispatch import receiver

The golden rule: i before e except after c