|
|
@ -30,7 +30,7 @@ class Command( BaseCommand ): |
|
|
|
statinfo = os.stat( settings.DATABASE_NAME ); |
|
|
|
|
|
|
|
if statinfo.st_uid == 0: |
|
|
|
raise TestFailed( "" |
|
|
|
raise TestFailed( |
|
|
|
"the database file belongs to root. This is most certainly not what " |
|
|
|
"you want because it will prevent your web server from being able " |
|
|
|
"to write to it. Please check." ); |
|
|
@ -48,15 +48,32 @@ class Command( BaseCommand ): |
|
|
|
def check_sites( self ): |
|
|
|
print "Checking URL configuration...", |
|
|
|
|
|
|
|
try: |
|
|
|
site = Site.objects.get_current(); |
|
|
|
|
|
|
|
except Site.DoesNotExist: |
|
|
|
try: |
|
|
|
sid = settings.SITE_ID |
|
|
|
except AttributeError: |
|
|
|
from django.core.exceptions import ImproperlyConfigured |
|
|
|
raise ImproperlyConfigured( |
|
|
|
"You're using the Django \"sites framework\" without having set the SITE_ID " |
|
|
|
"setting. Create a site in your database and rerun this command to fix this error.") |
|
|
|
else: |
|
|
|
print( "none set.\n" |
|
|
|
"Please enter the domain where Mumble-Django is reachable." ); |
|
|
|
dom = raw_input( "> " ).strip(); |
|
|
|
site = Site( id=sid, name=dom, domain=dom ); |
|
|
|
site.save(); |
|
|
|
|
|
|
|
if site.domain == 'example.com': |
|
|
|
print( "The domain is configured as example.com, which is the default but does not make sense." |
|
|
|
print( "still the default.\n" |
|
|
|
"The domain is configured as example.com, which is the default but does not make sense. " |
|
|
|
"Please enter the domain where Mumble-Django is reachable." ); |
|
|
|
|
|
|
|
site.domain = raw_input( "> " ).strip(); |
|
|
|
site.save(); |
|
|
|
|
|
|
|
else: |
|
|
|
print site.domain, "[ OK ]"; |
|
|
|
|
|
|
|
|
|
|
@ -79,7 +96,7 @@ class Command( BaseCommand ): |
|
|
|
mm = Mumble.objects.all(); |
|
|
|
|
|
|
|
if mm.count() == 0: |
|
|
|
raise TestFailed( "" |
|
|
|
raise TestFailed( |
|
|
|
"no Mumble servers are configured, you might want to run " |
|
|
|
"`./manage.py syncdb` to run an auto detection." ); |
|
|
|
|
|
|
|