showard | 26b7ec7 | 2009-12-21 22:43:57 +0000 | [diff] [blame] | 1 | from django.http import HttpResponse |
2 | |||||
3 | def 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) |