Files
mayan-edms/mayan/apps/smart_settings/management/commands/savesettings.py
Roberto Rosario f9fa3344d0 Add savesettings command
Signed-off-by: Roberto Rosario <roberto.rosario@mayan-edms.com>
2019-10-31 13:42:04 -04:00

19 lines
534 B
Python

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'))