I am trying to setup django admin page for my site. for my local dev server it is working now fine, but once i pushed the code to server, and tried to open the admin page, it is giving me 500 error page.
i saw the traceback, it is saying: DoesNotExist: Site matching query does not exist.
but I dont know why and what is happening here. this is the whole traceback,
http://pastebin.com/QCdGWTDq
can someone please help me?
Just add a Site
object via Django shell on production site:
$ python manage.py shell
>>> from django.contrib.sites.models import Site
>>> Site.objects.create(domain='example.com', name='example.com')
Where example.com
corresponds to your site's domain name used in production.
Normally a default Site
object should be automatically created when you run the syncdb
command, but I myself encountered cases when that didn't happen for some reason.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With