Commit 8252a61e authored by Jeremy Kerr's avatar Jeremy Kerr
Browse files

Add simple help infrastructure, with an 'about' page.

We'll need the about page for adding attribution for included
Signed-off-by: default avatarJeremy Kerr <>
parent f1f11ba9
......@@ -50,4 +50,7 @@ urlpatterns = patterns('',
# submitter autocomplete
(r'^submitter/$', 'patchwork.views.submitter_complete'),
# help!
(r'^help/(?P<path>.*)$', ''),
......@@ -22,7 +22,7 @@ from patchwork.models import Patch, Project, Person
from patchwork.filters import Filters
from patchwork.forms import LoginForm, PatchForm
from django.shortcuts import render_to_response, get_object_or_404
from django.http import HttpResponse, HttpResponseRedirect
from django.http import HttpResponse, HttpResponseRedirect, Http404
from django.db import transaction
from django.contrib.auth.models import User
from django.contrib.auth.decorators import login_required
......@@ -64,3 +64,12 @@ def submitter_complete(request):
json_serializer = serializers.get_serializer("json")()
json_serializer.serialize(queryset, ensure_ascii=False, stream=response)
return response
help_pages = {'': 'index.html', 'about/': 'about.html'}
def help(request, path):
context = PatchworkRequestContext(request)
if help_pages.has_key(path):
return render_to_response('patchwork/help/' + help_pages[path], context)
raise Http404
......@@ -24,16 +24,14 @@
<a href="{% url patchwork.views.user.profile %}">profile</a> ::
<a href="{% url patchwork.views.user.todo_lists %}">todo
({{ user.get_profile.n_todo_patches }})</a><br/>
<a href="{% url auth_logout %}">logout</a><!-- ::
<a href="/help/">help</a> -->
<a href="{% url auth_logout %}">logout</a> ::
<a href="{% url path="about/" %}">about</a>
{% else %}
<a href="{% url auth_login %}">login</a>
<a href="{% url registration_register %}">register</a>
<a href="/help/">help</a>
<a href="{% url path="about/" %}">about</a>
{% endif %}
<div style="clear: both;"></div>
{% extends "base.html" %}
{% block title %}About{% endblock %}
{% block heading %} - About Patchwork{% endblock %}
{% block body %}
<p>Patchwork is free software, and is available from the
<a href="">patchwork website</a>.</p>
<p>Patchwork is built on the <a href="">django</a>
web framework.</p>
<p>Patchwork includes the <a
{% endblock %}
{% extends "base.html" %}
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