python - django admin page is giving me 500 error in production -
this question has answer here:
- how fix django_sites table? 4 answers
i trying setup django admin page site. local dev server working fine, once pushed code server, , tried open admin page, giving me 500 error page.
i saw traceback, saying: doesnotexist: site matching query not exist.
but dont know why , happening here. whole traceback,
can please me?
just add site
object via django shell on production site:
$ python manage.py shell >>> django.contrib.sites.models import site >>> site.objects.create(domain='example.com', name='example.com')
where example.com
corresponds site's domain name used in production.
normally default site
object should automatically created when run syncdb
command, myself encountered cases when didn't happen reason.
- see also: django's “sites” framework documentation
Comments
Post a Comment