Issue
Im trying to get the admin site of my app in Django working. Ive just sync`d the DB and then gone to the site but I get the error ...
Site matching query does not exist.
Any ideas ?
Solution
Every django app needs a Site
to run. Here you do not seem to have it.
Log into your django shell
$> ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> site = Site()
>>> site.domain = 'example.com'
>>> site.name = 'example.com'
>>> site.save()
or
$> ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> site = Site.objects.create(domain='example.com', name='example.com')
>>> site.save()
You should be all set.
Answered By - karthikr
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.