mirror of
https://github.com/jazzband/django-constance.git
synced 2026-03-16 22:40:24 +00:00
Merge pull request #172 from miguelgr/master
Add app_config property to Config.Meta
This commit is contained in:
commit
68ff061ea6
1 changed files with 6 additions and 2 deletions
|
|
@ -20,7 +20,7 @@ from django.utils.module_loading import import_string
|
|||
from django.utils.translation import ugettext_lazy as _
|
||||
|
||||
|
||||
from . import LazyConfig, settings
|
||||
from . import LazyConfig, settings, apps
|
||||
|
||||
config = LazyConfig()
|
||||
|
||||
|
|
@ -255,8 +255,12 @@ class Config(object):
|
|||
|
||||
def get_change_permission(self):
|
||||
return 'change_%s' % self.model_name
|
||||
|
||||
@property
|
||||
def app_config(self):
|
||||
return apps.ConstanceConfig
|
||||
|
||||
_meta = Meta()
|
||||
|
||||
|
||||
|
||||
admin.site.register([Config], ConstanceAdmin)
|
||||
|
|
|
|||
Loading…
Reference in a new issue