blob: 14ac1e3d8b21c987d39e0795a0616efd70416625 [file] [log] [blame]
showard26b7ec72009-12-21 22:43:57 +00001from django.http import HttpResponse
2
3def model_documentation(models_module, model_names):
4 doc = '<h2>Models</h2>\n'
5 for model_name in model_names:
6 model_class = getattr(models_module, model_name)
7 doc += '<h3>%s</h3>\n' % model_name
8 doc += '<pre>\n%s</pre>\n' % model_class.__doc__
9 return HttpResponse(doc)