Should I remove 'django.contrib.comments' from my installed apps when I modify it by subclassing?

StackOverflow https://stackoverflow.com/questions/3819511

  •  26-09-2019
  •  | 
  •  

문제

I'm customizing django comments.

According to the docs you'll need to add your customized app to INSTALLED_APPS in settings.py, and set COMMENTS_APP to your app name.

INSTALLED_APPS = [
    ...
    'my_comment_app',
    ...
]

COMMENTS_APP = 'my_comment_app'

Should I also remove 'django.contrib.comments' from INSTALLED_APPS?

도움이 되었습니까?

해결책

If you are only extending contrib.comments not replacing it, you shouldn't remove it from installed apps since, for example, most of the templatetags you need are in that application.

In order for Django to find the templates, templatetags and so on app must be in the installed apps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top