Forked mumble-django project from https://bitbucket.org/Svedrin/mumble-django
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

58 lines
2.3 KiB

11 years ago
16 years ago
16 years ago
  1. # -*- coding: utf-8 -*-
  2. # kate: space-indent on; indent-width 4; replace-tabs on;
  3. """
  4. * Copyright © 2009-2010, Michael "Svedrin" Ziegler <diese-addy@funzt-halt.net>
  5. *
  6. * Mumble-Django is free software; you can redistribute it and/or modify
  7. * it under the terms of the GNU General Public License as published by
  8. * the Free Software Foundation; either version 2 of the License, or
  9. * (at your option) any later version.
  10. *
  11. * This package is distributed in the hope that it will be useful,
  12. * but WITHOUT ANY WARRANTY; without even the implied warranty of
  13. * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
  14. * GNU General Public License for more details.
  15. """
  16. from django.conf.urls import url, patterns, include
  17. from django.conf import settings
  18. from views import EXT_DIRECT_PROVIDER
  19. from forms import EXT_FORMS_PROVIDER
  20. urlpatterns = patterns(
  21. 'mumble.views',
  22. ( r'api/', include(EXT_DIRECT_PROVIDER.urls) ),
  23. ( r'forms/', include(EXT_FORMS_PROVIDER.urls) ),
  24. ( r'(?P<server>\d+)/(?P<userid>\d+)/texture.png', 'showTexture' ),
  25. ( r'(?P<userid>\d+)/update_avatar', 'update_avatar' ),
  26. ( r'murmur/tree/(?P<server>\d+)', 'mmng_tree' ),
  27. ( r'mumbleviewer/(?P<server>\d+).xml', 'mumbleviewer_tree_xml' ),
  28. ( r'mumbleviewer/(?P<server>\d+).json', 'mumbleviewer_tree_json'),
  29. ( r'mobile/(?P<server>\d+)/?$', 'mobile_show' ),
  30. ( r'mobile/?$', 'mobile_mumbles' ),
  31. ( r'embed/(?P<server>\d+)/?$', 'embed' ),
  32. ( r'qrcode/(?P<server>\d+).png', 'qrcode' ),
  33. ( r'(?P<server>\d+).json', 'cvp_json' ),
  34. ( r'(?P<server>\d+).xml', 'cvp_xml' ),
  35. ( r'(?P<server>\d+)/?$', 'show' ),
  36. ( r'$', 'mumbles' ),
  37. )
  38. if settings.DEBUG or True:
  39. # The following is a fake, to not break old installations. You should
  40. # really serve this stuff through the web server directly.
  41. from os.path import join, dirname, abspath, exists
  42. mediadir = join( dirname(abspath(__file__)), 'media' )
  43. urlpatterns.insert( 1, url(r'^media/(?P<path>.*)$',
  44. 'django.views.static.serve',
  45. {'document_root': mediadir, 'show_indexes': True} ),
  46. )