Skip to content

Instantly share code, notes, and snippets.

@artieziff
Created May 8, 2013 16:34
Show Gist options
  • Save artieziff/5541697 to your computer and use it in GitHub Desktop.
Save artieziff/5541697 to your computer and use it in GitHub Desktop.

###SITENAME/DOMAIN NAME ON DJANGO

from django.contrib.sites.models import Site

site = Site()

site.domain = 'example.com'

site.name = 'My website'

site.save()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment