Browse Source

added / url to standard urls (easier than redirect in apache config), repaired showContent

Natenom/support-murmur-13-1446181288462
Michael Ziegler 16 years ago
parent
commit
ab92032cf6
  1. 9
      pyweb/mumble/views.py
  2. 8
      pyweb/urls.py

9
pyweb/mumble/views.py

@ -77,7 +77,14 @@ def showContent( server, user = None ):
mumbleAcc = mmUsers[0];
t_content = loader.get_template( 'mumble/content.htm' );
c_content = Context( { 'DBaseObject': srv, 'ServerObject': o, 'ChannelTable': Storage.s, 'user': user, 'mumbleAccount': mumbleAcc } );
c_content = Context( {
'DBaseObject': srv,
'ServerObject': o,
'ChannelTable': Storage.s,
'user': user,
'mumbleAccount': mumbleAcc,
"CurrentUserIsAdmin": srv.isUserAdmin( request.user ),
} );
r_content = t_content.render( c_content );
return r_content;

8
pyweb/urls.py

@ -7,6 +7,7 @@ admin.autodiscover()
from django.conf import settings
urlpatterns = patterns('',
(r'^/?$', 'django.views.generic.simple.redirect_to', { 'url': '/mumble/' } ),
# Example:
# (r'^mumble_django/', include('mumble_django.foo.urls')),
@ -25,8 +26,7 @@ urlpatterns = patterns('',
# Development stuff
if settings.DEBUG:
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True} ),
(r'^/?$', 'django.views.generic.simple.redirect_to', { 'url': '/mumble/' } ),
)
urlpatterns += patterns('',
(r'^static/(?P<path>.*)$', 'django.views.static.serve', {'document_root': settings.MEDIA_ROOT, 'show_indexes': True} ),
)
Loading…
Cancel
Save