Add savesettings command
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
This commit is contained in:
@@ -35,6 +35,7 @@
|
|||||||
organize cache invalidation of both apps for tests.
|
organize cache invalidation of both apps for tests.
|
||||||
- Add a version attribute to setting namespace. These are dumped
|
- Add a version attribute to setting namespace. These are dumped
|
||||||
as SMART_SETTINGS_NAMESPACES.
|
as SMART_SETTINGS_NAMESPACES.
|
||||||
|
- Add savesettings command.
|
||||||
|
|
||||||
3.2.8 (2019-10-01)
|
3.2.8 (2019-10-01)
|
||||||
==================
|
==================
|
||||||
|
|||||||
@@ -0,0 +1,18 @@
|
|||||||
|
from __future__ import unicode_literals
|
||||||
|
|
||||||
|
from django.core import management
|
||||||
|
|
||||||
|
from ...classes import Setting
|
||||||
|
|
||||||
|
|
||||||
|
class Command(management.BaseCommand):
|
||||||
|
help = 'Save the current settings into the configuration file.'
|
||||||
|
|
||||||
|
def add_arguments(self, parser):
|
||||||
|
parser.add_argument(
|
||||||
|
'--filepath', action='store', dest='filepath',
|
||||||
|
help='Filename and path where to save the configuration file.'
|
||||||
|
)
|
||||||
|
|
||||||
|
def handle(self, *args, **options):
|
||||||
|
Setting.save_configuration(path=options.get('filepath'))
|
||||||
Reference in New Issue
Block a user