Note: This change is to support a project that I am working on. You should see no change in the behavior of your current Autotest installations.
-----
Implement the models and set up the RPC framework for the Test Planner
Signed-off-by: James Ren <jamesren@google.com>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4039 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/afe/views.py b/frontend/afe/views.py
index 32beb7a..6c938d9 100644
--- a/frontend/afe/views.py
+++ b/frontend/afe/views.py
@@ -4,6 +4,7 @@
from django.http import HttpResponseServerError
from django.template import Context, loader
from autotest_lib.client.common_lib import utils
+from autotest_lib.frontend import views_common
from autotest_lib.frontend.afe import models, rpc_handler, rpc_interface
from autotest_lib.frontend.afe import rpc_utils
@@ -26,13 +27,9 @@
def model_documentation(request):
- doc = '<h2>Models</h2>\n'
- for model_name in ('Label', 'Host', 'Test', 'User', 'AclGroup', 'Job',
- 'AtomicGroup'):
- model_class = getattr(models, model_name)
- doc += '<h3>%s</h3>\n' % model_name
- doc += '<pre>\n%s</pre>\n' % model_class.__doc__
- return HttpResponse(doc)
+ model_names = ('Label', 'Host', 'Test', 'User', 'AclGroup', 'Job',
+ 'AtomicGroup')
+ return views_common.model_documentation(models, model_names)
def redirect_with_extra_data(request, url, **kwargs):