Browse Source

I can't get auto detection to work properly, so this needs to be configured. :(

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
6d9b553248
  1. 14
      pyweb/__init__.py
  2. 11
      pyweb/settings.py

14
pyweb/__init__.py

@ -12,17 +12,3 @@
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details. * GNU General Public License for more details.
""" """
from django.core import signals
def update_paths( **kwargs ):
from django.core.urlresolvers import get_script_prefix, reverse
from os.path import join
from django.conf import settings
settings.MEDIA_URL = join( get_script_prefix(), settings.MEDIA_URL[1:] );
settings.ADMIN_MEDIA_PREFIX = join( get_script_prefix(), settings.ADMIN_MEDIA_PREFIX[1:] );
settings.LOGIN_URL = reverse( "django.contrib.auth.views.login" );
signals.request_started.disconnect( update_paths );
signals.request_started.connect( update_paths );

11
pyweb/settings.py

@ -29,6 +29,10 @@ MUMBLE_DJANGO_ROOT = None; ##
#MUMBLE_DJANGO_ROOT = '/home/mistagee/mumble-django'; ## #MUMBLE_DJANGO_ROOT = '/home/mistagee/mumble-django'; ##
#MUMBLE_DJANGO_ROOT = 'c:/web/mumble-django'; ## #MUMBLE_DJANGO_ROOT = 'c:/web/mumble-django'; ##
## ## ## ##
## Root URL (the path in the VirtualHost: ##
MUMBLE_DJANGO_URL = '/'; ##
#MUMBLE_DJANGO_URL = '/mumble-django/'; ##
## ##
## For a basic installation, this is all you need to edit in ## ## For a basic installation, this is all you need to edit in ##
## this file, the rest will be handled automatically! ## ## this file, the rest will be handled automatically! ##
## ## ## ##
@ -116,10 +120,13 @@ USE_I18N = True
MEDIA_ROOT = join( MUMBLE_DJANGO_ROOT, 'htdocs' ) MEDIA_ROOT = join( MUMBLE_DJANGO_ROOT, 'htdocs' )
# URL that handles the media served from MEDIA_ROOT. # URL that handles the media served from MEDIA_ROOT.
MEDIA_URL = '/static/';
MEDIA_URL = MUMBLE_DJANGO_URL+'static/'
# URL to the login view
LOGIN_URL = MUMBLE_DJANGO_URL+'accounts/login/'
# URL prefix for admin media -- CSS, JavaScript and images. # URL prefix for admin media -- CSS, JavaScript and images.
ADMIN_MEDIA_PREFIX = '/media/';
ADMIN_MEDIA_PREFIX = MUMBLE_DJANGO_URL+'media/'
# Make this unique, and don't share it with anybody. # Make this unique, and don't share it with anybody.
SECRET_KEY = 'u-mp185msk#z4%s(do2^5405)y5d!9adbn92)apu_p^qvqh10v' SECRET_KEY = 'u-mp185msk#z4%s(do2^5405)y5d!9adbn92)apu_p^qvqh10v'

Loading…
Cancel
Save