The version of django is 1.10 and Python version is 2.7.6 .After I have migrate and create table,it showed that I have migrated the django_comments.When I get into my admin,I can't find the django_comments app. By the way,I have installed django_comments.And I can use it normally on the front side.
Asked
Active
Viewed 363 times
0
-
Have you registered the model in your `admin.py`? – Vicky Leong Aug 05 '16 at 01:09
-
@VLeong django_comments is a thing which replace django-contrib-comments.It doesn't need to be registered in admin – huangweiwei Aug 05 '16 at 01:23
-
Is this what you used? https://github.com/django/django-contrib-comments – Vicky Leong Aug 05 '16 at 02:17
-
@VLeong Yes,I use it and I found it isn't shown in the admin – huangweiwei Aug 05 '16 at 02:29
-
I really think you have to register it in the admin. Please try doing that. Refer to my answer below. – Vicky Leong Aug 05 '16 at 02:31
-
@VLeong ok,I try it and it can work normally,thx – huangweiwei Aug 05 '16 at 02:40
1 Answers
0
Built-in apps like django.contrib.sites
automatically registers its model in the admin. I believe that since django_comments
is now a separated app from the django core, you'll have to register the model in the admin to see it.
If you've successfully migrated django_comments
and used it, then I think you're just missing the admin registration.
I started a brand new Django project to test this out, and I got to see the Comments
in my admin.
Using Python 2.7.12...
pip install django
pip install django-contrib-comments
django-admin startproject main
- Put my project
main
in theINSTALLED_APPS
- Followed steps 1 to 5 in the quickstart guide for
django-contrib-comments
(https://django-contrib-comments.readthedocs.io/en/latest/quickstart.html) python manage.py migrate
Included the following code in
main/admin.py
(create the file if it's not there):from django_comments.models import Comment admin.site.register(Comment)
python manage.py runserver
- Ran browser and logged into admin
- Comment is there

Vicky Leong
- 1,208
- 3
- 12
- 30