up
This commit is contained in:
parent
6f4360adb2
commit
ad1aca5838
6 changed files with 23 additions and 11 deletions
|
@ -97,7 +97,7 @@ class UsersDetails(PgSQLModel):
|
|||
city = CharField(null=True, default='')
|
||||
country = CharField(null=True, default='')
|
||||
state = CharField(null=True, default='')
|
||||
zipcode = IntegerField(null=True, default='')
|
||||
zipcode = IntegerField(null=True, default=0)
|
||||
|
||||
|
||||
class UsersBalance(PgSQLModel):
|
||||
|
|
|
@ -1,14 +1,19 @@
|
|||
# coding: utf-8
|
||||
|
||||
import sys
|
||||
import os
|
||||
import ConfigParser
|
||||
|
||||
__author__ = 'sa'
|
||||
default_file = '/etc/sws/cloud/settings.ini'
|
||||
# default_file = '%s/gocloud.ini' % os.getenv('HOME')
|
||||
|
||||
settings_file = os.getenv('CLOUDNS_SETTINGS_FILE', default_file)
|
||||
|
||||
# current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
|
||||
current_path = os.path.dirname(os.path.abspath(__file__))
|
||||
# setting file read
|
||||
settings = ConfigParser.ConfigParser()
|
||||
if os.path.exists(current_path + "/../settings.ini"):
|
||||
settings.read(current_path + "/../settings.ini")
|
||||
if os.path.exists(settings_file):
|
||||
settings.read(settings_file)
|
||||
else:
|
||||
print "Fail"
|
||||
sys.exit('settings file not found: %s' % settings_file)
|
||||
|
|
|
@ -191,7 +191,7 @@ def login():
|
|||
password = request.form['password']
|
||||
|
||||
# validation entered data
|
||||
if not requests.email(email):
|
||||
if not validators.email(email):
|
||||
flash(u'Неправильный адрес електронной почты', 'error')
|
||||
return redirect(url_for('account.login'))
|
||||
|
||||
|
|
|
@ -3,7 +3,7 @@
|
|||
from uuid import uuid4
|
||||
import validators
|
||||
|
||||
from flask import Blueprint
|
||||
from flask import Blueprint, flash
|
||||
from flask import g
|
||||
from flask import jsonify
|
||||
from flask import redirect
|
||||
|
@ -51,8 +51,8 @@ def login():
|
|||
# redirect to rules list
|
||||
return redirect(url_for('administrator.dashboard'))
|
||||
else:
|
||||
flah('Invalid login. Please try again.')
|
||||
return redirect('administrator.login')
|
||||
flash('Invalid login. Please try again.')
|
||||
return redirect(url_for('administrator.login'))
|
||||
return render_template('administrator/login.html')
|
||||
|
||||
|
||||
|
|
2
setup.py
2
setup.py
|
@ -4,7 +4,7 @@ from setuptools import setup
|
|||
|
||||
setup(
|
||||
name='SWSCloudCore',
|
||||
version='2.1.2',
|
||||
version='2.1.6',
|
||||
author='Vyacheslav Anzhiganov',
|
||||
author_email='hello@anzhiganov.com',
|
||||
packages=[
|
||||
|
|
7
swscloud-runserver.py
Normal file
7
swscloud-runserver.py
Normal file
|
@ -0,0 +1,7 @@
|
|||
#!/usr/bin/env python
|
||||
# coding: utf-8
|
||||
|
||||
from SWSCloudCore import app
|
||||
|
||||
if __name__ == '__main__':
|
||||
app.run()
|
Loading…
Add table
Reference in a new issue