django dagi changelist_view

my_app.views dan changelist_view ni qanday qilib chaqira olaman? HTML/db uchun render HTML-ni saqlash kerak

def view_to_string(self, request, extra_context=None):
        from django.template.loader import render_to_string
        from django.http import HttpResponse
        import codecs
        file = super(ProjectAdmin, self).changelist_view(request, extra_context=Non
        f = codecs.open('/home/django/workfile', 'w', encoding="UTF-8")
        f.write(str(file).decode("utf8"))
        f.close()

http://paste.ofcode.org/MVDJR2RhjnNL5QCBDVK3w6

1

Javob yo'q

0