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 <[email protected]>
git-svn-id: http://test.kernel.org/svn/autotest/trunk@4039 592f7852-d20e-0410-864c-8624ca9c26a4
diff --git a/frontend/views_common.py b/frontend/views_common.py
new file mode 100644
index 0000000..14ac1e3
--- /dev/null
+++ b/frontend/views_common.py
@@ -0,0 +1,9 @@
+from django.http import HttpResponse
+
+def model_documentation(models_module, model_names):
+ doc = '<h2>Models</h2>\n'
+ for model_name in model_names:
+ model_class = getattr(models_module, model_name)
+ doc += '<h3>%s</h3>\n' % model_name
+ doc += '<pre>\n%s</pre>\n' % model_class.__doc__
+ return HttpResponse(doc)