Created
May 24, 2010 02:13
-
-
Save rmax/411456 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/django/contrib/sites/management.py b/django/contrib/sites/management.py | |
index 1987274..40f93ae 100644 | |
--- a/django/contrib/sites/management.py | |
+++ b/django/contrib/sites/management.py | |
@@ -8,9 +8,15 @@ from django.contrib.sites import models as site_app | |
def create_default_site(app, created_models, verbosity, db, **kwargs): | |
if Site in created_models: | |
+ domain = "example.com" | |
+ if kwargs.get('interactive', True): | |
+ msg = "Enter your Site domain [%s]: " % domain | |
+ input_domain = raw_input(msg).strip() | |
+ if input_domain: | |
+ domain = input_domain | |
if verbosity >= 2: | |
- print "Creating example.com Site object" | |
- s = Site(domain="example.com", name="example.com") | |
+ print "Creating %s Site object" % domain | |
+ s = Site(domain=domain, name=domain) | |
s.save(using=db) | |
Site.objects.clear_cache() |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment