pythondjangoimporterrordjango-settingsdjango-comments

Import error while customizing django-comments-xtd


acordign to the documentation for django-XtdComments in order to have my custom comment model instead of XtdComment the setting file should be like this:

COMMENTS_APP = "django_comments_xtd"

COMMENTS_XTD_MODEL = 'commenting.models.BookComment'

at this poin I have a commenting app and a BookComment model to use for Comment model but setting file gives me Import Error that Module "commenting.models" does not define a "BookComment" attribute/class can anyone help me what's wrong with this code?


Solution

  • The reason I got this error was circular import in models.py It solved by deleting useless imports