문제

I have a custom comment app but also want to use the original Comment app, without the added fields of my custom app. Is there a way to do this?

Thanks!

도움이 되었습니까?

해결책

Sure, but if you named your custom app "comments" as well, you'll have to be extra careful to keep things straight. It would probably be best to import Django's comment system like so:

from django.contrib import comments as django_comments

You can then access the comment model like:

django_comments.Comment

Which will signal where it's actually coming from at a glance.

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