summaryrefslogtreecommitdiff
path: root/django/bin/django-admin.py
diff options
context:
space:
mode:
authorAdrian Holovaty <adrian@holovaty.com>2005-07-16 03:48:36 +0000
committerAdrian Holovaty <adrian@holovaty.com>2005-07-16 03:48:36 +0000
commitd095db81f5167a4e40c6eb60eb9557152c781cb6 (patch)
treebbe38ca26e99f9173357bd3410d0d5b2d546c10b /django/bin/django-admin.py
parent52f5c949e9b50ae3b0034d67f2d385219588aaf1 (diff)
'django-admin.py init' now creates a site in the sites table, and project_template.settings.main.SITE_ID is now set to 1
git-svn-id: http://code.djangoproject.com/svn/django/trunk@93 bcc190cf-cafb-0310-a4f2-bffc1f526a37
Diffstat (limited to 'django/bin/django-admin.py')
-rw-r--r--django/bin/django-admin.py1
1 files changed, 1 insertions, 0 deletions
diff --git a/django/bin/django-admin.py b/django/bin/django-admin.py
index f6950dbf06..ca4eb99e51 100644
--- a/django/bin/django-admin.py
+++ b/django/bin/django-admin.py
@@ -271,6 +271,7 @@ def init():
cursor = db.db.cursor()
for sql in get_sql_create(core) + get_sql_create(auth) + get_sql_initial_data(core) + get_sql_initial_data(auth):
cursor.execute(sql)
+ cursor.execute("INSERT INTO %s (domain, name) VALUES ('mysite.com', 'My Django site')" % core.Site._meta.db_table)
except Exception, e:
sys.stderr.write("Error: The database couldn't be initialized. Here's the full exception:\n%s\n" % e)
db.db.rollback()