0

I tried to install django_messages

I copied the folder in my directory and ran this command:

python manage.py makemigrations

The error is this:

C:\Users\Admin\Desktop\sample\enginesearch1>python manage.py runserver
Performing system checks...

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x0000025D3C50A488>
Traceback (most recent call last):
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\django\utils\autoreload.py", line 225, in wrapper
    fn(*args, **kwargs)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
    self.check(display_num_errors=True)
  File "C:\Users\Admin\AppData\Local\Programs\Python\Python36\lib\site-packages\django\core\management\base.py", line 410, in check
    raise SystemCheckError(msg)
django.core.management.base.SystemCheckError: SystemCheckError: System check identified some issues:

ERRORS:
django_messages.Message.sender: (fields.E320) Field specifies on_delete=SET_NULL, but cannot be null.
        HINT: Set null=True argument on the field, or change the on_delete rule.

What's the problem here and where should i change?

Uchiha AJ
  • 147
  • 3
  • 16

1 Answers1

0

In your Message module (In models.py) you might have entered a field named as sender you can not set a null value so to do so an example is given below:

field = models.ForeignKey(File, null=True, blank=True,on_delete=models.SET_NULL)
Sonia Rani
  • 608
  • 9
  • 4
  • that is a package in itself, the error is caused due to version incompatibility. Thank you for your concern – Uchiha AJ Aug 14 '18 at 09:43