# submitter autocomplete
(r'^submitter/$', 'patchwork.views.submitter_complete'),
+
+ # help!
+ (r'^help/(?P<path>.*)$', 'patchwork.views.help'),
)
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
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
+
<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 patchwork.views.help path="about/" %}">about</a>
{% else %}
<a href="{% url auth_login %}">login</a>
<br/>
<a href="{% url registration_register %}">register</a>
- <!--
<br/>
- <a href="/help/">help</a>
- -->
+ <a href="{% url patchwork.views.help path="about/" %}">about</a>
{% endif %}
</div>
<div style="clear: both;"></div>
--- /dev/null
+{% 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="http://ozlabs.org/~jk/projects/patchwork/">patchwork website</a>.</p>
+
+<p>Patchwork is built on the <a href="http://djangoproject.com/">django</a>
+web framework.</p>
+
+<p>Patchwork includes the <a
+href="http://code.google.com/p/django-registration/">django-registration</a>
+application.</a>
+
+{% endblock %}
+
--- /dev/null
+{% extends "base.html" %}
+