Пример #1
0
 def browse_model_fields_view(self, request, pk, app, model):
     fields = dict()
     if pk and get_model(app, model):
         for f in get_model(app, model)._meta.fields:
             try:
                 fields[f.name] = unicode(f.verbose_name)
             except NameError:
                 fields[f.name] = f.verbose_name
     return render(request, 'dbmail/browse.html', {'fields_list': fields})
Пример #2
0
 def browse_model_fields_view(self, request, pk, app, model):
     fields = dict()
     if pk and get_model(app, model):
         for f in get_model(app, model)._meta.fields:
             try:
                 fields[f.name] = unicode(f.verbose_name)
             except NameError:
                 fields[f.name] = f.verbose_name
     return render(request, 'dbmail/browse.html', {'fields_list': fields})