]> git.ozlabs.org Git - patchwork/blobdiff - apps/urls.py
Only add /xmlrpc/ URL if ENABLE_XMLRPC is set.
[patchwork] / apps / urls.py
index 6e7f34ef6ffbecbaceede041278341f8aca791d1..9886fd7c9841f2635e3569b6ee49ad61fd0ff2a2 100644 (file)
@@ -18,6 +18,7 @@
 # Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA  02111-1307  USA
 
 from django.conf.urls.defaults import *
+from django.conf import settings
 from patchwork.admin import admin_site
 
 from registration.views import register
@@ -47,3 +48,8 @@ urlpatterns = patterns('',
      (r'^images/(?P<path>.*)$', 'django.views.static.serve',
         {'document_root': '/srv/patchwork/htdocs/images'}),
 )
+
+if settings.ENABLE_XMLRPC:
+    urlpatterns += patterns('',
+                   (r'xmlrpc/$', 'django_xmlrpc.views.handle_xmlrpc'),
+    )