mirror of
https://github.com/tahoe-lafs/tahoe-lafs.git
synced 2025-01-12 16:02:43 +00:00
Make UploadResultsPage a Resource
This commit is contained in:
parent
62e803db25
commit
44ecfdad09
@ -3,6 +3,7 @@ import urllib
|
|||||||
from twisted.web import http
|
from twisted.web import http
|
||||||
from twisted.internet import defer
|
from twisted.internet import defer
|
||||||
from twisted.python.filepath import FilePath
|
from twisted.python.filepath import FilePath
|
||||||
|
from twisted.web.resource import Resource
|
||||||
from twisted.web.template import (
|
from twisted.web.template import (
|
||||||
XMLFile,
|
XMLFile,
|
||||||
renderer,
|
renderer,
|
||||||
@ -19,7 +20,6 @@ from allmydata.web.common import (
|
|||||||
WebError,
|
WebError,
|
||||||
get_format,
|
get_format,
|
||||||
get_mutable_type,
|
get_mutable_type,
|
||||||
MultiFormatResource,
|
|
||||||
)
|
)
|
||||||
from allmydata.web import status
|
from allmydata.web import status
|
||||||
|
|
||||||
@ -73,7 +73,7 @@ def POSTUnlinkedCHK(req, client):
|
|||||||
return d
|
return d
|
||||||
|
|
||||||
|
|
||||||
class UploadResultsPage(MultiFormatResource):
|
class UploadResultsPage(Resource, object):
|
||||||
"""'POST /uri', to create an unlinked file."""
|
"""'POST /uri', to create an unlinked file."""
|
||||||
|
|
||||||
def __init__(self, upload_results):
|
def __init__(self, upload_results):
|
||||||
@ -83,7 +83,7 @@ class UploadResultsPage(MultiFormatResource):
|
|||||||
super(UploadResultsPage, self).__init__()
|
super(UploadResultsPage, self).__init__()
|
||||||
self._upload_results = upload_results
|
self._upload_results = upload_results
|
||||||
|
|
||||||
def render_HTML(self, req):
|
def render_POST(self, req):
|
||||||
elem = UploadResultsElement(self._upload_results)
|
elem = UploadResultsElement(self._upload_results)
|
||||||
return renderElement(req, elem)
|
return renderElement(req, elem)
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user