Changeset 1042 for locker/deploy/bin
- Timestamp:
- Apr 1, 2009, 11:50:09 AM (16 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
locker/deploy/bin/django
r1038 r1042 58 58 } elsif (/Chicago/) { 59 59 $_ =~ s/Chicago/New_York/; 60 } elsif (/^ADMIN_MEDIA_PREFIX/) { 61 $_ = "ADMIN_MEDIA_PREFIX = '/__scripts/django/media/'"; 62 } elsif (/^INSTALLED_APPS/) { 63 print NEWSETTINGS "$_\n"; 64 while (<SETTINGS>) { 65 if (/^\)/) { 66 print NEWSETTINGS " 'django.contrib.admin',\n"; 67 print NEWSETTINGS " 'django.contrib.admindocs',\n"; 68 } 69 print NEWSETTINGS $_; 70 } 60 71 } 61 72 print NEWSETTINGS "$_\n"; … … 64 75 close SETTNGS; 65 76 rename "settings.py.new", "settings.py"; 77 78 open URLS, "urls.py"; 79 open NEWURLS, ">urls.py.new"; 80 while (<URLS>) { 81 chomp; 82 if (/^#.*from django\.contrib import admin/) { 83 $_ =~ s/^# *//; 84 } elsif (/^#.*admin.autodiscover/) { 85 $_ =~ s/^# *//; 86 } elsif (/^ *# *\(r\'\^admin\//) { 87 $_ =~ s/# *//; 88 } 89 print NEWURLS "$_\n"; 90 } 91 close NEWURLS; 92 close URLS; 93 rename "urls.py.new", "urls.py"; 94 95 print "Initializing your project's SQL database schema...\n"; 96 system qw{./manage.py syncdb --noinput}; 97 print "...done\n"; 98 99 print "Creating your superuser account... "; 100 system qw{./manage.py createsuperuser --username}, $admin_username, "--email", $email, "--noinput"; 101 print "done\n"; 102 print "Setting your superuser password... "; 103 system qw{mysql -D}, "$USER+$addrlast", "-e", "UPDATE auth_user SET password=MD5(\'$admin_password\') WHERE username=\'$admin_username\'"; 104 print "done\n"; 66 105 67 106 print "\nDjango has been installed.\n\nYour project is located in:\n";
Note: See TracChangeset
for help on using the changeset viewer.