def fields_documentation(request): content = docs.generate_fields_doc(mimetype='html') return render_to_response('docs.html', { 'title': 'Data Field Index', 'content': content }, context_instance=RequestContext(request))
def handle(self, *args, **options): output = docs.generate_fields_doc(mimetype=options['mimetype']) sys.stdout = codecs.getwriter(locale.getpreferredencoding())(sys.stdout) sys.stdout.write(output) sys.exit(0)