Commit 8f69dd50 authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Add pwclientrc configuration file sample for each project



This allows users to easily configure pwclient for a patchwork
instance.
Signed-off-by: default avatarJeremy Kerr <jk@ozlabs.org>
parent 4b41c609
......@@ -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
urlpatterns = patterns('',
# Example:
......@@ -54,3 +55,9 @@ urlpatterns = patterns('',
# help!
(r'^help/(?P<path>.*)$', 'patchwork.views.help'),
)
if settings.ENABLE_XMLRPC:
urlpatterns += patterns('',
(r'^project/(?P<project_id>[^/]+)/pwclientrc/$',
'patchwork.views.pwclientrc'),
)
......@@ -56,6 +56,14 @@ def project(request, project_id):
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")
......
# 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 %}
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment