# Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
from django.conf.urls.defaults import *
+from django.conf import settings
urlpatterns = patterns('',
# Example:
# help!
(r'^help/(?P<path>.*)$', 'patchwork.views.help'),
)
+
+if settings.ENABLE_XMLRPC:
+ urlpatterns += patterns('',
+ (r'^project/(?P<project_id>[^/]+)/pwclientrc/$',
+ 'patchwork.views.pwclientrc'),
+ )
return render_to_response('patchwork/project.html', context)
+def pwclientrc(request, project_id):
+ project = get_object_or_404(Project, linkname = project_id)
+ context = PatchworkRequestContext(request)
+ context.project = project
+ return render_to_response('patchwork/pwclientrc', context,
+ mimetype = 'text/plain')
+
+
def submitter_complete(request):
search = request.GET.get('q', '')
response = HttpResponse(mimetype = "text/plain")
--- /dev/null
+# Sample .pwclientrc file for the {{ project.linkname }} project,
+# running on {{ site.domain }}.
+#
+# Save this file to ~/.pwclientrc
+#
+[base]
+url: http://{{site.domain}}{% url django_xmlrpc.views.handle_xmlrpc %}
+project: {{ project.linkname }}
+{% if user.is_authenticated %}
+[auth]
+user: {{ user.username }}
+password: <add your patchwork password here>
+{% endif %}