simplify save function in settings.py