1

I just installed django-cms on my server. Right after the installation, there was an example site (example.com).

To adapt the site to my needs, I deleted this site. It seems like this was a mistake - now all I get "DoesNotExist"-Exceptions, even when I go to /admin/.

Is it possible to repair that or would resetting the installation be an easier solution?

speendo
  • 13,045
  • 22
  • 71
  • 107

1 Answers1

2

Just as @karthikr stated

first run

$> ./manage.py shell
>>> from django.contrib.sites.models import Site
>>> site = Site.objects.create(domain='example.com', name='example.com')
>>> site.save()

then lookup the Site-Id:

>>>Site.object.all()[0].pk

Use this value in settings.py for the value of SITE_ID

Don't forget to restart django.

speendo
  • 13,045
  • 22
  • 71
  • 107