Bug 845229 - added custom settings support

Conflicts:
	Makefile
Merge pull request #8346 from yurenju/settings.py-v1-train

Bug 845229 - added custom settings support