allowed_methods = ('GET')
@hglibrary
- def read(self, request, docid, lib):
+ def read(self, request, docid, lib, stylesheet='partial'):
"""Read document as html text"""
try:
revision = request.GET.get('revision', 'latest')
'message': 'Provided revision refers, to document "%s", but provided "%s"' % (document.id, docid) })
return librarian.html.transform(document.data('xml'), is_file=False, \
- parse_dublincore=False, stylesheet="partial",\
+ parse_dublincore=False, stylesheet=stylesheet,\
options={
"with-paths": 'boolean(1)',
})
# User is not permitted to make a merge, right away
# So we instead create a pull request in the database
try:
- prq, created = PullRequest.get_or_create(
+ prq, created = PullRequest.objects.get_or_create(
source_revision = str(udoc.revision),
defaults = {
'comitter': request.user,