from django.db import models
{% for table_key, table_value in tables.items %}

class {{ schema_name }}_{{ table_key }}_model(models.Model):
{% for column in table_value %}    {{ column|safe }}
{% endfor %}
    class Meta:
        managed = False
        db_table = '{{ schema_name }}\".\"{{ table_key }}'
{% endfor %}