2012-09-28 22:29:48 +02:00
|
|
|
# -*- coding: utf-8 -*-
|
|
|
|
|
|
|
|
# Copyright: (c) 2008, Jarek Zgoda <jarek.zgoda@gmail.com>
|
|
|
|
|
|
|
|
__revision__ = '$Id: util.py 3 2008-11-18 07:33:52Z jarek.zgoda $'
|
|
|
|
|
|
|
|
from django.conf import settings
|
|
|
|
|
|
|
|
def get_status_field(app_label, model_name):
|
2016-09-10 21:29:08 +02:00
|
|
|
# type: (str, str) -> str
|
2012-09-28 22:29:48 +02:00
|
|
|
model = '%s.%s' % (app_label, model_name)
|
|
|
|
mapping = getattr(settings, 'STATUS_FIELDS', {})
|
2016-06-20 17:19:54 +02:00
|
|
|
return mapping.get(model, 'status')
|