~ubuntu-branches/ubuntu/quantal/python-django/quantal-security

« back to all changes in this revision

Viewing changes to django/contrib/sites/management.py

  • Committer: Bazaar Package Importer
  • Author(s): Chris Lamb
  • Date: 2010-05-21 07:52:55 UTC
  • mfrom: (1.3.6 upstream)
  • mto: This revision was merged to the branch mainline in revision 28.
  • Revision ID: james.westby@ubuntu.com-20100521075255-ii78v1dyfmyu3uzx
Tags: upstream-1.2
ImportĀ upstreamĀ versionĀ 1.2

Show diffs side-by-side

added added

removed removed

Lines of Context:
6
6
from django.contrib.sites.models import Site
7
7
from django.contrib.sites import models as site_app
8
8
 
9
 
def create_default_site(app, created_models, verbosity, **kwargs):
 
9
def create_default_site(app, created_models, verbosity, db, **kwargs):
10
10
    if Site in created_models:
11
11
        if verbosity >= 2:
12
12
            print "Creating example.com Site object"
13
13
        s = Site(domain="example.com", name="example.com")
14
 
        s.save()
 
14
        s.save(using=db)
15
15
    Site.objects.clear_cache()
16
16
 
17
17
signals.post_syncdb.connect(create_default_site, sender=site_app)