Source

django-helper / django_helper / templates / admin / django_helper / models.txt

from django.db import models
{% for model in model_list %}
class {{model}}(models.Model):{% for field in model.field_set.all %}
    {{field}} = models.{{field.field_type}}({{field.get_field_options}}){% endfor %}
    def __unicode__(self):
        return {% if model.unicode %}u"%s" % self.{{model.unicode}}{% else %}{{model.unicode_str}}{% endif %}
    @models.permalink
    def get_absolute_url(self):
        return {{model.absolute_url}}
{% endfor %}