Fields/Data not visible in Django Admin

132 Views Asked by At

I have used django-nonrel to connect Django and Mongodb, as the database. When I deploy my app through apache on my machine, I can view the models/collections but cannot view the fields/data in the collections through Django Admin nor can I perform any mongodb operations through pymongo in the scripts/views (views.py) as they return no results.

However, when I run it locally using:

python manage.py runserver

then I can view all my data in Django Admin panel and the pymongo operations also give the correct results.

I have registered the models and have also tried using ALLOWED_HOSTS as suggested in one of the posts

ALLOWED_HOSTS = ['localhost', '127.0.0.1', MY_IP]

The database is on a remote server(Amazon's server). Do I need to provide any other authentication to access the data when I deploy it on a server?

0

There are 0 best solutions below