console/cli-settings-init.py
Vyacheslav Anzhiganov d6f4a0e348 Merge commit 'bf9e0731bcd036956918559645d2a8cd4a3a2c94'
# Conflicts:
#	README.md
#	SWSCloudCore/__init__.py
#	SWSCloudCore/static/css/gocloud.css
#	SWSCloudCore/static/css/hp.css
#	SWSCloudCore/static/css/normalize.css
#	SWSCloudCore/static/css/style.css
#	SWSCloudCore/templates/default/_header.html
#	SWSCloudCore/templates/default/containers/index.html
#	SWSCloudCore/templates/default/homepage/index.en.html
#	SWSCloudCore/templates/default/id/_account_information_edit.html
#	SWSCloudCore/templates/default/id/_account_information_view.html
#	SWSCloudCore/templates/default/id/billing.html
#	SWSCloudCore/templates/default/id/edit.html
#	SWSCloudCore/templates/default/tasks/index.html
#	SWSCloudCore/templates/errors/403.html
#	SWSCloudCore/templates/errors/404.html
#	SWSCloudCore/templates/errors/410.html
#	SWSCloudCore/templates/errors/500.html
#	SWSCloudCore/views/account/__init__.py
#	SWSCloudCore/views/api/__init__.py
#	SWSCloudCore/views/containers/__init__.py
#	SWSCloudCore/views/payments/__init__.py
#	app/static/css/app.css
#	app/static/css/gocloud.css
#	app/templates/default/_footer.html
#	app/templates/default/errors/404.html
#	app/templates/default/errors/410.html
#	app/templates/default/errors/500.html
#	app/templates/default/homepage/index.html
#	app/templates/default/id/_account_information_view.html
#	app/templates/default/settings/profile/_account_information_view.html
#	app/templates/default/tasks/index.html
#	app/templates/default/tasks/index.ru.html
#	app/templates/errors/404.html
#	app/templates/errors/410.html
#	app/templates/errors/500.html
#	kb/README.md
2016-04-02 02:20:12 +03:00

51 lines
1.6 KiB
Python

from SWSCloudCore import models
__author__ = 'vanzhiganov'
def create_key(key, val=''):
if models.Settings.select().where(models.Settings.key == key).count() == 0:
models.Settings.create(key=key, val=val)
else:
print 'key %s already exists' % key
create_key('bonus', '300')
create_key('PAY_ROBOKASSA_MODE', '')
create_key('PAY_ROBOKASSA_LOGIN', '')
create_key('PAY_ROBOKASSA_PASSWORD1', '')
create_key('PAY_ROBOKASSA_PASSWORD2', '')
create_key('PAY_ROBOKASSA_ENABLED', '')
create_key('PAY_TWOCHECKOUT_ENABLED', '0')
create_key('PAY_TWOCHECKOUT_MODE', '')
create_key('PAY_TWOCHECKOUT_SELLER_ID', '')
create_key('PAY_TWOCHECKOUT_PRIVATEKEY', '')
create_key('PAY_TWOCHECKOUT_PUBLICKEY', '')
create_key('SMTP_PORT', '')
create_key('SMTP_USERNAME', '')
create_key('SMTP_PASSWORD', '')
create_key('SMTP_TIMEOUT', '')
create_key('SMTP_FROM', '')
create_key('SMTP_SENDER', '')
create_key('SMTP_SSL', '1')
create_key('SMTP_SERVER', 'smtp.yandex.ru')
create_key('CLOUDNS_EMAIL', '')
create_key('CLOUDNS_SECRET', '')
create_key('CLOUDNS_DOMAIN', '')
create_key('CLOUDNS_HOST_BALANCE', 'servers.gocloud.ru.')
create_key('CLOUDNS_HOST_BALANCE', 'lb.gocloud.ru')
create_key('footer_code', '')
create_key("mail.template_name", "simple")
create_key('mail.logotype', "https://procdn.ru/static/images/logo/procdn-logo-48.png")
create_key("mail.company_name", "ProCDN.ru")
create_key("contacts.email", "support@procdn.ru")
create_key("contacts.phone", "+7 499 7020 236")
create_key("social.googleplus", "http://plus.google.com/#efef")
create_key("social.facebook", "")
create_key("social.twitter", "")