Browse Source

remove ViewResolver fakery and simply get the prefix from MUMBLE_DJANGO_URL.

Natenom/support-murmur-13-1446181288462
Michael Ziegler 15 years ago
parent
commit
b63df9db48
  1. 28
      pyweb/deferred_resolver.py
  2. 8
      pyweb/settings.py

28
pyweb/deferred_resolver.py

@ -1,28 +0,0 @@
# -*- coding: utf-8 -*-
"""
* Copyright (C) 2009, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net>
*
* Mumble-Django is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* This package is distributed in the hope that it will be useful,
* but WITHOUT ANY WARRANTY; without even the implied warranty of
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
* GNU General Public License for more details.
"""
class ViewResolver( object ):
def __init__( self, string, *args, **kwargs ):
self._string = string;
self._args = args;
self._kwargs = kwargs;
def __str__( self ):
from django.core.urlresolvers import reverse
return reverse( self._string, *self._args, **self._kwargs );
def __add__( self, other ):
return str( self ) + other;

8
pyweb/settings.py

@ -149,11 +149,9 @@ MEDIA_URL = MUMBLE_DJANGO_URL+'static/'
# URL prefix for admin media -- CSS, JavaScript and images. # URL prefix for admin media -- CSS, JavaScript and images.
ADMIN_MEDIA_PREFIX = MUMBLE_DJANGO_URL+'media/' ADMIN_MEDIA_PREFIX = MUMBLE_DJANGO_URL+'media/'
# URL to the login view - will be resolved on-demand
from deferred_resolver import ViewResolver
LOGIN_URL = ViewResolver( "django.contrib.auth.views.login" )
LOGIN_REDIRECT_URL = ViewResolver( "views.profile" )
# URL to the login view
LOGIN_URL = MUMBLE_DJANGO_URL + 'accounts/login';
LOGIN_REDIRECT_URL = MUMBLE_DJANGO_URL + 'accounts/profile';
# 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