测试gitnore
This commit is contained in:
@@ -8,16 +8,9 @@ from django.core.management.color import no_style
|
||||
from django.db import DEFAULT_DB_ALIAS, connections, router
|
||||
|
||||
|
||||
def create_default_site(
|
||||
app_config,
|
||||
verbosity=2,
|
||||
interactive=True,
|
||||
using=DEFAULT_DB_ALIAS,
|
||||
apps=global_apps,
|
||||
**kwargs,
|
||||
):
|
||||
def create_default_site(app_config, verbosity=2, interactive=True, using=DEFAULT_DB_ALIAS, apps=global_apps, **kwargs):
|
||||
try:
|
||||
Site = apps.get_model("sites", "Site")
|
||||
Site = apps.get_model('sites', 'Site')
|
||||
except LookupError:
|
||||
return
|
||||
|
||||
@@ -32,9 +25,7 @@ def create_default_site(
|
||||
# can also crop up outside of tests - see #15346.
|
||||
if verbosity >= 2:
|
||||
print("Creating example.com Site object")
|
||||
Site(
|
||||
pk=getattr(settings, "SITE_ID", 1), domain="example.com", name="example.com"
|
||||
).save(using=using)
|
||||
Site(pk=getattr(settings, 'SITE_ID', 1), domain="example.com", name="example.com").save(using=using)
|
||||
|
||||
# We set an explicit pk instead of relying on auto-incrementation,
|
||||
# so we need to reset the database sequence. See #17415.
|
||||
|
||||
Reference in New Issue
Block a user