fnp
/
redakcja.git
/ commitdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
| commitdiff |
tree
raw
|
patch
|
inline
| side by side (parent:
ac2e9ce
)
HTML iupdate.
author
Łukasz Rekucki
<lrekucki@gmail.com>
Sat, 26 Sep 2009 19:50:55 +0000
(21:50 +0200)
committer
Łukasz Rekucki
<lrekucki@gmail.com>
Sat, 26 Sep 2009 19:50:55 +0000
(21:50 +0200)
apps/api/handlers/library_handlers.py
patch
|
blob
|
history
apps/api/management/commands/doc_upload.py
patch
|
blob
|
history
apps/api/resources.py
patch
|
blob
|
history
apps/api/urls.py
patch
|
blob
|
history
diff --git
a/apps/api/handlers/library_handlers.py
b/apps/api/handlers/library_handlers.py
index
86aef21
..
0ad23d9
100644
(file)
--- a/
apps/api/handlers/library_handlers.py
+++ b/
apps/api/handlers/library_handlers.py
@@
-173,7
+173,7
@@
class DocumentHTMLHandler(BaseHandler):
else:
document = lib.document_for_rev(revision)
else:
document = lib.document_for_rev(revision)
- return librarian.html.transform(document.data('xml'))
+ return librarian.html.transform(document.data('xml')
, is_file=False
)
except RevisionNotFound:
return response.EntityNotFound().django_response()
except RevisionNotFound:
return response.EntityNotFound().django_response()
diff --git
a/apps/api/management/commands/doc_upload.py
b/apps/api/management/commands/doc_upload.py
index
66ef924
..
414c474
100644
(file)
--- a/
apps/api/management/commands/doc_upload.py
+++ b/
apps/api/management/commands/doc_upload.py
@@
-32,11
+32,12
@@
class Command(BaseCommand):
bookname = args[1]
print "Uploading '%s' as document '%s'" % (filename, bookname)
bookname = args[1]
print "Uploading '%s' as document '%s'" % (filename, bookname)
- print "Wth DC template" if options['dc'] else ""
+ print options['dc']
+ print "With DC template" if options['dc'] is not None else ""
print client.post( reverse("document_list_view"),\
{
'bookname': bookname,
'ocr_file': open(filename),
print client.post( reverse("document_list_view"),\
{
'bookname': bookname,
'ocr_file': open(filename),
- 'generate_dc': options['dc'] } )
+ 'generate_dc': options['dc']
or False
} )
diff --git
a/apps/api/resources.py
b/apps/api/resources.py
index
2d09787
..
51127e4
100644
(file)
--- a/
apps/api/resources.py
+++ b/
apps/api/resources.py
@@
-39,6
+39,7
@@
__all__ = [
'library_resource',
'document_resource',
'document_text_resource',
'library_resource',
'document_resource',
'document_text_resource',
+ 'document_html_resource',
'document_dc_resource',
'document_merge',
'toolbar_buttons',
'document_dc_resource',
'document_merge',
'toolbar_buttons',
diff --git
a/apps/api/urls.py
b/apps/api/urls.py
index
8c47e83
..
6a95cf0
100644
(file)
--- a/
apps/api/urls.py
+++ b/
apps/api/urls.py
@@
-47,7
+47,7
@@
urlpatterns = patterns('',
name="doctext_view"),
url(urlpath(r'documents', DOC, 'html', REVISION, format=False),
name="doctext_view"),
url(urlpath(r'documents', DOC, 'html', REVISION, format=False),
- document_
text
_resource, {'emitter_format': 'rawhtml'},
+ document_
html
_resource, {'emitter_format': 'rawhtml'},
name="dochtml_view"),
url(urlpath(r'documents', DOC, 'dc', REVISION),
name="dochtml_view"),
url(urlpath(r'documents', DOC, 'dc', REVISION),