Import error while customizing django-comments-xtd

86 Views Asked by At

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?

1

There are 1 best solutions below

0
On BEST ANSWER

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