The error message says “keyword argument repeated”
Look at the keyword arguments and check for repeated ones.
I see it in the definition of parent.  Do you see it?


From: django-users@googlegroups.com [mailto:django-users@googlegroups.com] On 
Behalf Of Dennis Alabi
Sent: Wednesday, November 7, 2018 8:51 AM
To: Django users
Subject: SyntaxError: keyword argument repeated


    django.setup()
  File 
"C:\Users\User\Anaconda3\envs\myprogv\lib\site-packages\django\__init__.py", 
line 24, in setup
    apps.populate(settings.INSTALLED_APPS)
  File 
"C:\Users\User\Anaconda3\envs\myprogv\lib\site-packages\django\apps\registry.py",
 line 112, in populate
    app_config.import_models()
  File 
"C:\Users\User\Anaconda3\envs\myprogv\lib\site-packages\django\apps\config.py", 
line 198, in import_models
    self.models_module = import_module(models_module_name)
  File "C:\Users\User\Anaconda3\envs\myprogv\lib\importlib\__init__.py", line 
126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 994, in _gcd_import
  File "<frozen importlib._bootstrap>", line 971, in _find_and_load
  File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 674, in exec_module
  File "<frozen importlib._bootstrap_external>", line 781, in get_code
  File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
  File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
  File 
"C:\Users\User\Documents\cctv_project\openCV\cam_project\customers\models.py", 
line 85
    on_delete=models.CASCADE,related_name="'zone's", null=True, 
related_name='children'
                                                               ^
SyntaxError: keyword argument repeated


I get the above error and the potion of my code causing it in models.py is 
given below, please help out

# Relationship Fields
    user = ForeignKey(
        'customers.User',
        on_delete=models.CASCADE, related_name="users"
    )
    parent = ForeignKey(
        'customers.Zone',
        on_delete=models.CASCADE, related_name="'zone's", null=True, 
related_name='children'
    )

--
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+unsubscr...@googlegroups.com<mailto:django-users+unsubscr...@googlegroups.com>.
To post to this group, send email to 
django-users@googlegroups.com<mailto:django-users@googlegroups.com>.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/277c4a05-6744-4d77-b571-db4e5a42386d%40googlegroups.com<https://groups.google.com/d/msgid/django-users/277c4a05-6744-4d77-b571-db4e5a42386d%40googlegroups.com?utm_medium=email&utm_source=footer>.
For more options, visit https://groups.google.com/d/optout.

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/624423a6bae949b5966429bb426a3426%40iss2.ISS.LOCAL.
For more options, visit https://groups.google.com/d/optout.

Reply via email to