开发者

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

开发者 https://www.devze.com 2023-01-18 13:36 出处:网络
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.

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' fr开发者_开发技巧om 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.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号