old_contents: from django.http import HttpResponse
  import ModelGenerator
  from ModelGenerator import data
  from ModelGenerator.data import newtable
  
  def index(request):
    return HttpResponse("hi")
  
  def dblist(request, *args, **kwargs):
    print ModelGenerator
    t = ModelGenerator.getModel(kwargs['database'], kwargs['table'])
  
    print ModelGenerator.data
  
    print t
  
    v = t(c1 = 5, c2 = "asdf")
    v.save()
  
    s = ''
    for i in t.objects.all():
      s += str((i.c1, i.c2))
  
    s += "\n"
  
    for i in t.__fields__:
      s += str(i)
      s += "\n"
  
    return HttpResponse(s)
  
  
  
new_contents: from django.http import HttpResponse
  from django.core import serializers
  from ModelGenerator import getModel
  
  def index(request):
    return HttpResponse("hi")
  
  def dblist(request, *args, **kwargs):
    t = getModel(kwargs['database'], kwargs['table'])
  
    #v = t(c1 = 5, c2 = "asdf")
    #v.save()
  
    response = HttpResponse()
  
    serializers.serialize('json', t.objects.all(), stream=response)
  
    return response
  
  
  
subject: Test json serializer