def register(): new_user = {} if request.method == "POST": already_registered = con.check_if_already_registered(request.form['username']) if already_registered is False: new_user['username'] = request.form['username'] new_user['password'] = hash_password(request.form['password']) con.register(new_user) return render_template('index.html') else: username_used = "yes" return render_template('registration.html', username_used=username_used) return render_template('registration.html')
"'myotherappid': {\n\t\t\t"\ "'REST_API_KEY':'myotherrestkey',\n\t\t\t"\ "'MASTER_KEY':'myothermasterkey'\n\t\t"\ "}\n\t}" ) try: unicode = unicode except NameError: # is python3 unicode = str for app_id in settings_local.KEYS: register( app_id, settings_local.KEYS.get(app_id).get('REST_API_KEY'), master_key = settings_local.KEYS.get(app_id).get('MASTER_KEY'), ) GLOBAL_JSON_TEXT = """{ "applications": { "_default": { "link": "parseapi" }, "parseapi": { "applicationId": "%s", "masterKey": "%s" } }, "global": { "parseVersion": "1.1.16"
try: import settings_local except ImportError: sys.exit('You must create a settings_local.py file with APPLICATION_ID, ' \ 'REST_API_KEY, MASTER_KEY variables set') try: unicode = unicode except NameError: # is python3 unicode = str register( getattr(settings_local, 'APPLICATION_ID'), getattr(settings_local, 'REST_API_KEY'), master_key=getattr(settings_local, 'MASTER_KEY') ) GLOBAL_JSON_TEXT = """{ "applications": { "_default": { "link": "parseapi" }, "parseapi": { "applicationId": "%s", "masterKey": "%s" } }, "global": { "parseVersion": "1.1.16"
from core import ResourceRequestNotFound from connection import register, ParseBatcher from datatypes import GeoPoint, Object, Function from user import User import query try: import settings_local except ImportError: sys.exit('You must create a settings_local.py file with APPLICATION_ID, ' \ 'REST_API_KEY, MASTER_KEY variables set') register( getattr(settings_local, 'APPLICATION_ID'), getattr(settings_local, 'REST_API_KEY'), master_key=getattr(settings_local, 'MASTER_KEY') ) GLOBAL_JSON_TEXT = """{ "applications": { "_default": { "link": "parseapi" }, "parseapi": { "applicationId": "%s", "masterKey": "%s" } }, "global": { "parseVersion": "1.1.16"
import query try: import settings_local except ImportError: sys.exit("You must create a settings_local.py file with APPLICATION_ID, " "REST_API_KEY, MASTER_KEY variables set") try: unicode = unicode except NameError: # is python3 unicode = str register( getattr(settings_local, "APPLICATION_ID"), getattr(settings_local, "REST_API_KEY"), master_key=getattr(settings_local, "MASTER_KEY"), ) GLOBAL_JSON_TEXT = """{ "applications": { "_default": { "link": "parseapi" }, "parseapi": { "applicationId": "%s", "masterKey": "%s" } }, "global": { "parseVersion": "1.1.16"