Ejemplo n.º 1
0
def pull_data(firebase, auth, email):

    ## NEED TO PULL DATA HERE
    email = email.replace(".", 'dot')
    PrelimInfo.expenses = firebase.database().child("Users").child(
        email).child("Financial Profile").child("Expenses").get().val()
    PrelimInfo.real_time = firebase.database().child("Users").child(
        email).child("Financial Profile").child(
            "Real-time Budget").get().val()
    return
Ejemplo n.º 2
0
def uploadmv(name):
    config = {
        "apiKey": "AIzaSyBqCUjjzZ5wJ7DrQ5q1kd0EI_up5K2KFxw",  # webkey
        "authDomain": "objproject-cd7af.firebaseapp.com",  # 프로젝트ID
        "databaseURL":
        "https://objproject-cd7af.firebaseio.com",  # database url
        "storageBucket": "objproject-cd7af.appspot.com"  # storage
    }
    firebase = pyrebase.initialize_app(config)

    # Authentication - 필요하면
    # #auth = firebase.auth()
    # #user = auth.sign_in_with_email_and_password("*****@*****.**", "????")

    # #업로드할 파일명
    default = "./"
    # uploadfile = default + name +'/'+ name +'.gif'
    uploadfile = default + '/movie.gif'

    # #업로드할 파일의 확장자 구하기
    s = os.path.splitext(uploadfile)[1]
    # #업로드할 새로운파일이름
    #Option1 현재시간
    #now = datetime.today().strftime("%Y%m%d_%H%M%S")
    #Option2 User's Name
    now = name
    filename = now + s

    # Upload files to Firebase
    storage = firebase.storage()

    storage.child("videos/" + filename).put(uploadfile)
    fileUrl = storage.child("videos/" + filename).get_url(1)
    # 0은 저장소 위치 1은 다운로드 url 경로이다.
    # 동영상 파일 경로를 알았으니 어디에서든지 참조해서 사용할 수 있다.
    print(
        fileUrl
    )  # 업로드한 파일과 다운로드 경로를 database에 저장하자. 그래야 나중에 사용할 수 있다. storage에서 검색은 안된다는 것 같다.
    # save files info in database
    db = firebase.database()
    d = {}
    d[filename] = fileUrl
    data = json.dumps(d)
    # results = db.child("files").push(data)
    results = db.child("files").set(data)
    print("OK")  # Retrieve data - 전체 파일목록을 출력해 보자. 안드로이드앱에서 출려하게 하면 된다.
    db = firebase.database()
    files = db.child("files").get().val()  # 딕셔너리로 반환된다.
    print(files)

    return fileUrl
Ejemplo n.º 3
0
def postsignup(request):
    name = request.POST.get('name')
    email = request.POST.get('email')
    password = request.POST.get('password')
    gender = request.POST.get('gender')

    user = authentication.create_user_with_email_and_password(email, password)
    uid = user['localId']
    data = {"Name": name, "Email": email}

    if gender == "male":
        gen = "Man"
    else:
        gen = "Woman"
    firebase.database().child("Users").child(uid).set(data)
    return render(request, 'signin.html')
Ejemplo n.º 4
0
def initial_info(firebase, email, salary, total_tax, take_home_monthly,
                 prov_code):

    # replace '.' with dot, so firebase doesnt throw error

    email = email.replace(".", 'dot')

    db = firebase.database()
    data = {
        "Salary": float(salary),
        "Prov_code": prov_code,
        "Total_Tax": float(total_tax),
        "Take_home_income": take_home_monthly,
        "Expenses": {
            "Rent": PrelimInfo.expenses['rent'],
            "Internet": PrelimInfo.expenses['internet'],
            "Phone": PrelimInfo.expenses['phone'],
            "Groceries": PrelimInfo.expenses['groceries'],
            "Commute": PrelimInfo.expenses['commute'],
            "Utility": PrelimInfo.expenses['utility'],
            "Entertainment": PrelimInfo.expenses['entertainment'],
            "Hobbies": PrelimInfo.expenses['hobbies']
        }
    }

    db.child("Users").child(email).child("Financial Profile").set(data)

    return
Ejemplo n.º 5
0
def updatedb(realname, name, attr1, attr2):

    config = {
        "apiKey": "AIzaSyBqCUjjzZ5wJ7DrQ5q1kd0EI_up5K2KFxw",
        "authDomain": "objproject-cd7af.firebaseapp.com",
        "databaseURL": "https://objproject-cd7af.firebaseio.com",
        "projectId": "objproject-cd7af",
        "storageBucket": "objproject-cd7af.appspot.com",
        "messagingSenderId": "1035720506965"
    }

    firebase = pyrebase.initialize_app(config)

    db = firebase.database()
    #Dotransfer(name , attr1 , attr2)                #Transfer 영상 생성 Name 과 Attr 전달

    myurl = uploadmv(name)
    removerequest()
    db = db.child("feed").child('2').update({
        'feed_contents':
        'This is Feed Contents',
        'feed_img_url':
        myurl,
        'feed_like':
        random.randrange(1, 100),
        'id':
        '123',
        'name':
        realname
    })
Ejemplo n.º 6
0
def fdb():
    config = {
      "apiKey": "AIzaSyAgaU3OQHbglNDTmPrQlYr0hQg_M_MyA5Y",
      "authDomain": "fam-data.firebaseapp.com",
      "databaseURL": "https://fam-data.firebaseio.com",
      "storageBucket": "fam-data.appspot.com"
    }
    firebase = pyrebase.initialize_app(config)
    db = firebase.database()
    return db
Ejemplo n.º 7
0
def upload_image(image, date_time, violation_count):
    image_path = "temp.jpg"
    image_name = str(datetime.datetime.now()) + ".jpg"
    cv2.imwrite(image_path, image)
    url = upload_to_dropbox(image_path, image_name)
    database = firebase.database()
    autoID = database.child(database_path).child(camera_id).generate_key()
    data = {
        "image_link": url,
        "timestamp": date_time,
        "number_of_moto_violation": violation_count
    }
    database.child(autoID).set(data)
Ejemplo n.º 8
0
def removerequest():
    config = {
        "apiKey": "AIzaSyBqCUjjzZ5wJ7DrQ5q1kd0EI_up5K2KFxw",
        "authDomain": "objproject-cd7af.firebaseapp.com",
        "databaseURL": "https://objproject-cd7af.firebaseio.com",
        "projectId": "objproject-cd7af",
        "storageBucket": "objproject-cd7af.appspot.com",
        "messagingSenderId": "1035720506965"
    }

    firebase = pyrebase.initialize_app(config)

    db = firebase.database()

    db = db.child("Request").remove()
Ejemplo n.º 9
0
def add_user_to_db(firebase, email, name):

    # replace '.' with dot, so firebase doesnt throw error
    replace = "dot"
    #email = replace.join(email.rsplit('.', 1))

    email = email.replace(".", 'dot')

    db = firebase.database()
    data = {"Name": name, "Phone": '123-456-7890'}

    # add User to the data base under 'Users'
    db.child("Users").child(email).set(data)

    #print("Returning from ")

    return
Ejemplo n.º 10
0
def func_cadastrar_restaurante(email, senha):
    config = {
        'apiKey': "AIzaSyAQwcftJBr3l60CLrKkRS1CjbMS6gom-nI",
        'authDomain': "ouvidoria-b8505.firebaseapp.com",
        'projectId': "ouvidoria-b8505",
        "databaseURL": "https://ouvidoria-b8505-default-rtdb.firebaseio.com",
        'storageBucket': "ouvidoria-b8505.appspot.com",
        'messagingSenderId': "309174700054",
        'appId': "1:309174700054:web:1a2f22886efbdfd5050d37",
        'measurementId': "G-1QEZMQME5N"
    }
    firebase = pyrebase.initialize_app(config)
    database = firebase.database()
    auth = firebase.auth()
    user = auth.create_user_with_email_and_password(email, senha)
    user_uid = user['localId']
    database.child("Users/DadosGeograficos/" + user_uid).set({
        'userId': user_uid,
        'Email': email,
        'Senha': senha,
    })
Ejemplo n.º 11
0
def check_for_sir(sentence):
    if 'sir' in sentence:

        import pyrebase

        config = {
        "apiKey": "AIzaSyBbxqnz3BZ5j5pfD7c4hOVBSrAfr3ziT78",
        "authDomain": "nvidiahack-d0e6d.firebaseapp.com",
        "databaseURL": "https://nvidiahack-d0e6d.firebaseio.com",
        "storageBucket": "nvidiahack-d0e6d.appspot.com",
        "serviceAccount": "/home/swap/s2s/nvidiaHack-52580fff8e27.json"
        }

        firebase = pyrebase.initialize_app(config)
        auth = firebase.auth()

        db=firebase.database()
        user = auth.sign_in_with_email_and_password("*****@*****.**", "nvidia")
        
        sir_data = db.child("sir_presence").get(user['idToken']).val()
        return(sir_data)
Ejemplo n.º 12
0
def calendary():
    config = {
        "apiKey": "AIzaSyD7geC0GEHTf9vREokkJGRRkad5BETp5q0",
        "authDomain": "organizateusm.firebaseapp.com",
        "databaseURL": "https://organizateusm-default-rtdb.firebaseio.com",
        "projectId": "organizateusm",
        "storageBucket": "organizateusm.appspot.com",
        "messagingSenderId": "950537281109",
        "appId": "1:950537281109:web:86dd2cd4dead3496053edc"
    }

    username = session['username']
    firebase = pyrebase.initialize_app(config)
    db = firebase.database()
    eventos = db.child("user").child(username).child("calendary").get()
    dic = eventos.val()
    listaEventos = []

    if dic != None:
        for eventito in dic:
            listaEventos.append(dic[eventito])

    return render_template('calendary.html', listaEventos=listaEventos)
Ejemplo n.º 13
0
def helloFirebase(request):

    config = {
        "apiKey": "AIzaSyCfRRjL3jvA8pY0jJ_SdSwwW9SV2zsZFlg",
        "authDomain": "inventario-ab622.firebaseapp.com",
        "databaseURL": "https://inventario-ab622.firebaseio.com",
        "projectId": "inventario-ab622",
        "storageBucket": "inventario-ab622.appspot.com",
        "messagingSenderId": "933969484304",
        "appId": "1:933969484304:web:8e79e29e2b246ce9"
    }

    # initialize app with config
    firebase = pyrebase.initialize_app(config)

    db = firebase.database()

    users = db.child("Users").get().each()

    info = []
    for user in users:
        info.append(user.val())

    return HttpResponse(info)
def database_push(request):
    import time
    import collections

    df = excel_sheet()
    print(len(df))
    config = {
        "apiKey": "AIzaQWERTYUIOPs65yzzMRdDI621eEEDgpU",
        "authDomain": "QWERTYUIOP-621eEED.firebaseapp.com",
        "databaseURL": "https://QWERTYUIOP.firebaseio.com",
        "storageBucket": "QWERTYUIOP-621eEED.appspot.com",
    }
    vendor_id = '10110269'
    firebase = pyrebase.initialize_app(config)
    database = firebase.database()
    event_ids = database.child('vendor').child(vendor_id).shallow().child(
        'events').get().val()
    #od = collections.OrderedDict(sorted(event_ids.keys()))
    lis = []
    for item in event_ids:
        f, l = item.split('_')
        lis.append(l)
    lists = sorted(lis, key=int)
    event_id = (int(lists[-1]) + 1)

    print(event_id)

    b = 0
    c = len(df)
    while b < c:
        df = excel_sheet()
        df.rename(columns={
            'Title': 'name',
            'Start_Seconds': 'start_time',
            'End_Seconds': 'end_time',
            'Location': 'venue_name',
            'Latitude_Longitude': 'venue',
            'Image_Url': 'image',
            'Email': 'email',
            'Mobile_Number': 'mobile',
            'KeyWords': 'keyword',
            'Categories': 'category',
            'Event_Details': 'description'
        },
                  inplace=True)
        df = df.iloc[[b]]
        tktInfo = df[[
            'ticket_name', 'ticket_price', 'ticket_quantity', 'ticket_capping',
            'ticket_description', 'ticket_old_price'
        ]].copy()
        tktInfo = tktInfo.to_dict(orient='records')
        tktId = int(round(time.time() * 1000))
        newEventId = str(vendor_id) + "_" + str(event_id)
        data = df[[
            'keyword', 'category', 'image', 'end_time', 'start_time', 'name',
            'email', 'mobile', 'venue_name', 'venue', 'description'
        ]].copy()
        data['event_id'] = newEventId
        data['status'] = 'pending'
        data['page_views'] = '0'
        print(
            "====================dataframe starts here============================"
        )
        #print(data)
        data = data.to_dict(orient='records')

        dataV = df[['category', 'image', 'end_time', 'start_time',
                    'name']].copy()
        dataV['event_id'] = newEventId
        dataV = dataV.to_dict(orient='records')
        print(newEventId)
        #print (dataV)
        print("it ends=======================================")
        #print (data)
        firebase = pyrebase.initialize_app(config)
        database = firebase.database()

        database.child('event').child(newEventId).child('details').set(data[0])

        database.child('vendor').child(vendor_id).child('events').child(
            newEventId).set(dataV[0])

        database.child('event').child(newEventId).child('details').child(
            'ticket_category').child(tktId).set(tktInfo[0])

        event_id += 1
        b += 1
    return HttpResponse("datapushed successfully")
 def __init__(self, name):
     firebase = pyrebase.initialize_app(FirebaseConfig)
     self.db = firebase.database()
Ejemplo n.º 16
0
# This code should be used with every script that you will be using to connect to the Firebase database.
import pyrebase
from firebase import firebase
config = {
    # You can get all these info from the firebase website. It's associated with your account.
    "apiKey": "AIzaSyA3SmPEZdgyxWIcENXi1V098gof4MvAdSI",
    "authDomain": "greenhouseproject-58231.firebaseapp.com",
    "databaseURL": "https://greenhouseproject-58231.firebaseio.com",
    "storageBucket": "greenhouseproject-58231.appspot.com"
}

firebase = pyrebase.initialize_app(config)
db = firebase.database()
while 1:
    humidity, temperature = Adafruit_DHT.read_retry(Adafruit_DHT.DHT22, 4)
    time_hhmmss = time.strftime('%H:%M:%S')
    date_mmddyyyy = time.strftime('%d/%m/%Y')
    data = {
        "Date": date_mmddyyyy,
        "Time": time_hhmmss,
        "Temperature": temperature,
        "Humidity": humidity
    }
    db.child("/message").push(data)
    print("Temp: %f -- Date: %s  -- Time: %s" %
          (x, date_mmddyyyy, time_hhmmss))
    time.sleep(60)
Ejemplo n.º 17
0
    "client_email":
    "*****@*****.**",
    "client_id":
    "111973346925804974041",
    "auth_uri":
    "https://accounts.google.com/o/oauth2/auth",
    "token_uri":
    "https://oauth2.googleapis.com/token",
    "auth_provider_x509_cert_url":
    "https://www.googleapis.com/oauth2/v1/certs",
    "client_x509_cert_url":
    "https://www.googleapis.com/robot/v1/metadata/x509/firebase-adminsdk-1ac1t%40sathi-7855d.iam.gserviceaccount.com"
}

config = {
    'apiKey': "AIzaSyBmACm1iYZkQOzfSYmOlzHzS22pTdGkCFQ",
    'authDomain': "sathi-7855d.firebaseapp.com",
    'databaseURL': "https://sathi-7855d.firebaseio.com",
    'projectId': "sathi-7855d",
    'storageBucket': "sathi-7855d.appspot.com",
    'messagingSenderId': "1085368744685",
    'appId': "1:1085368744685:web:e54fd4d72e9b2e823faae4",
    'measurementId': "G-S5RDQF37XR"
}

firebase = pyrebase.initialize_app(config)

authentication = firebase.auth()

retrieveDatabase = firebase.database()
Ejemplo n.º 18
0
from django.urls import reverse

Config = {
    'apiKey': "AIzaSyCwt1tJItYRoKDo5omL6dVNF0gqEWhncPU",
    'authDomain': "loginformdjango.firebaseapp.com",
    'databaseURL': "https://loginformdjango.firebaseio.com",
    'projectId': "loginformdjango",
    'storageBucket': "loginformdjango.appspot.com",
    'messagingSenderId': "798266349598",
    'appId': "1:798266349598:web:c4eed81998add0f9b8b60f",
    'measurementId': "G-7218SJKRHX"
}

firebase = Firebase(Config)
auth = firebase.auth()
databse = firebase.database()


def login(request):
    return render(request, template_name="login.html")


def postlogin(request):
    username = request.POST.get('username')
    password = request.POST.get('password')
    try:
        user = auth.sign_in_with_username_and_password(username, password)
    except:
        message = "Oops! Wrong Credentials. Try Again!"
        return render(request, "login.html", {'message': message})
    session_id = user['idToken']
Ejemplo n.º 19
0
def info():
    # name_of_persons = ""
    # gender=""
    # aadhar_number=""
    # dates_aadhar=""
    # address=""
    # name_of_person_pan=""
    # father_name=""
    # pan_c=""
    # datee_pan=""
    # if "pan_name" in session:

    # 	name_of_persons = session["aadhar_name"]
    # 	gender = session["gender"]
    # 	aadhar_number = session["adharcard"]
    # 	dates_aadhar = session["date_adhar"]
    # 	datess = dates_aadhar.split("00:00:00 GMT")
    # 	address = session["address"]
    # 	name_of_person_pan = session["pan_name"]
    # 	father_name = session["father_name"]
    # 	pan_c = session["pancard_number"]
    # 	datee_pan = session["date_pan"]
    db = firebase.database()
    counttt = FBConn.get('/count_data/', None)
    for i, a in counttt.items():
        data_c = int(a['count'])
        da = data_c + 1
    datta = {'count': int(da)}
    print(datta)
    print(i)
    db.child('/count_data/').child(i).update(datta)
    uploads = 'E:\PROJECT\\aadhar_OCR'
    app.config['uploads'] = uploads
    if request.method == "POST":
        if request.form['upload'] == "Upload":
            uploaddd = request.files['files']
            foo = Image.open(uploaddd)
            foo = foo.resize((300, 300), Image.ANTIALIAS)
            print(foo)
            foo.save('E:\PROJECT\\aadhar_OCR\\' + str(da) + 'Aadhar_Front.jpg',
                     optimize=True,
                     quality=95)
            # spl = os.path.basename('E:\PROJECT\\aadhar_OCR\\'+str(da)+'ima.jpg')
            # print(spl)
            # spll = spl.split(".")
            # data_name=str(da)+"Aadhar_Front"+"."+spll[1]
            # filena = secure_filename(data_name)
            # print(filena)

            # uploaddd.save(os.path.join(app.config['uploads'], filena))
            storage.child(str(da) +
                          'Aadhar_Front.jpg').put('E:\PROJECT\\aadhar_OCR\\' +
                                                  str(da) + 'Aadhar_Front.jpg')
            filena = str(da) + 'Aadhar_Front.jpg'
            # storage = firebase.storage()
            data_a = filena.split(".")
            files = storage.list_files()
            for file in files:
                word = storage.child(file.name).get_url(None)
                if (word.find(data_a[0]) != -1):
                    data_url = storage.child(file.name).get_url(None)
                    aadhar_url_front = data_url

            uploa = request.files['fil']
            foos = Image.open(uploa)
            foos = foos.resize((300, 300), Image.ANTIALIAS)
            print(foos)
            foos.save('E:\PROJECT\\aadhar_OCR\\' + str(da) + 'Aadhar_Back.jpg',
                      optimize=True,
                      quality=95)
            # spl = os.path.basename('E:\PROJECT\\aadhar_OCR\\'+str(da)+'ima.jpg')
            # print(spl)
            # spll = spl.split(".")
            # data_name=str(da)+"Aadhar_Front"+"."+spll[1]
            # filena = secure_filename(data_name)
            # print(filena)

            # uploaddd.save(os.path.join(app.config['uploads'], filena))
            storage.child(str(da) +
                          'Aadhar_Back.jpg').put('E:\PROJECT\\aadhar_OCR\\' +
                                                 str(da) + 'Aadhar_Back.jpg')
            filena = str(da) + 'Aadhar_Back.jpg'
            # storage = firebase.storage()
            data_a = filena.split(".")
            files = storage.list_files()
            for file in files:
                word = storage.child(file.name).get_url(None)
                if (word.find(data_a[0]) != -1):
                    data_url = storage.child(file.name).get_url(None)
                    aadhar_url_back = data_url

            uploads = request.files['filess']
            fooss = Image.open(uploads)
            fooss = fooss.resize((300, 300), Image.ANTIALIAS)
            print(fooss)
            fooss.save('E:\PROJECT\\aadhar_OCR\\' + str(da) + 'Proof.jpg',
                       optimize=True,
                       quality=95)
            # spl = os.path.basename('E:\PROJECT\\aadhar_OCR\\'+str(da)+'ima.jpg')
            # print(spl)
            # spll = spl.split(".")
            # data_name=str(da)+"Aadhar_Front"+"."+spll[1]
            # filena = secure_filename(data_name)
            # print(filena)

            # uploaddd.save(os.path.join(app.config['uploads'], filena))
            storage.child(str(da) +
                          'Proof.jpg').put('E:\PROJECT\\aadhar_OCR\\' +
                                           str(da) + 'Proof.jpg')
            filena = str(da) + 'Proof.jpg'
            # storage = firebase.storage()
            data_a = filena.split(".")
            files = storage.list_files()
            for file in files:
                word = storage.child(file.name).get_url(None)
                if (word.find(data_a[0]) != -1):
                    data_url = storage.child(file.name).get_url(None)
                    proof_url = data_url

            uploadss = request.files['uploadsss']
            foosss = Image.open(uploadss)
            foosss = foosss.resize((300, 300), Image.ANTIALIAS)
            print(foosss)
            foosss.save('E:\PROJECT\\aadhar_OCR\\' + str(da) + 'Cheque.jpg',
                        optimize=True,
                        quality=95)
            # spl = os.path.basename('E:\PROJECT\\aadhar_OCR\\'+str(da)+'ima.jpg')
            # print(spl)
            # spll = spl.split(".")
            # data_name=str(da)+"Aadhar_Front"+"."+spll[1]
            # filena = secure_filename(data_name)
            # print(filena)

            # uploaddd.save(os.path.join(app.config['uploads'], filena))
            storage.child(str(da) +
                          'Cheque.jpg').put('E:\PROJECT\\aadhar_OCR\\' +
                                            str(da) + 'Cheque.jpg')
            filena = str(da) + 'Cheque.jpg'
            # storage = firebase.storage()
            data_a = filena.split(".")
            files = storage.list_files()
            for file in files:
                word = storage.child(file.name).get_url(None)
                if (word.find(data_a[0]) != -1):
                    data_url = storage.child(file.name).get_url(None)
                    cheque_url = data_url

            upl = request.files['upl']
            foossss = Image.open(upl)
            foossss = foossss.resize((300, 300), Image.ANTIALIAS)
            print(foossss)
            foossss.save('E:\PROJECT\\aadhar_OCR\\' + str(da) + 'Degree.jpg',
                         optimize=True,
                         quality=95)
            # spl = os.path.basename('E:\PROJECT\\aadhar_OCR\\'+str(da)+'ima.jpg')
            # print(spl)
            # spll = spl.split(".")
            # data_name=str(da)+"Aadhar_Front"+"."+spll[1]
            # filena = secure_filename(data_name)
            # print(filena)

            # uploaddd.save(os.path.join(app.config['uploads'], filena))
            storage.child(str(da) +
                          'Degree.jpg').put('E:\PROJECT\\aadhar_OCR\\' +
                                            str(da) + 'Degree.jpg')
            filena = str(da) + 'Degree.jpg'
            # storage = firebase.storage()
            data_a = filena.split(".")
            files = storage.list_files()
            for file in files:
                word = storage.child(file.name).get_url(None)
                if (word.find(data_a[0]) != -1):
                    data_url = storage.child(file.name).get_url(None)
                    degree_url = data_url
            # uploa = request.files['fil']
            # spl = uploa.filename
            # spll = spl.split(".")
            # uploa.filename=str(da)+"Aadhar_Back"+"."+spll[1]
            # filenam = secure_filename(uploa.filename)
            # print(filenam)
            # uploa.save(os.path.join(app.config['uploads'], filenam))

            # storage.child(filenam).put(filenam)
            # # storage = firebase.storage()
            # data_a = filenam.split(".")
            # files = storage.list_files()
            # for file in files:
            # 	word=storage.child(file.name).get_url(None)
            # 	if (word.find(data_a[0]) != -1):
            # 		data_url = storage.child(file.name).get_url(None)
            # 		aadhar_url_back = data_url

            # uploads = request.files['filess']
            # spl = uploads.filename
            # print(spl)
            # spll = spl.split(".")
            # uploads.filename=str(da)+"Proof"+"."+spll[1]
            # filenames = secure_filename(uploads.filename)
            # print(filenames)
            # uploads.save(os.path.join(app.config['uploads'], filenames))
            # storage.child(filenames).put(filenames)
            # # storage = firebase.storage()
            # data_a = filenames.split(".")
            # files = storage.list_files()
            # for file in files:
            # 	word=storage.child(file.name).get_url(None)
            # 	if (word.find(data_a[0]) != -1):
            # 		data_url = storage.child(file.name).get_url(None)
            # 		proof_url = data_url
            # uploadss = request.files['uploadsss']
            # spl = uploadss.filename
            # spll = spl.split(".")
            # uploadss.filenamess=str(da)+"cheque"+"."+spll[1]
            # filenamess = secure_filename(uploadss.filenamess)
            # print(filenamess)
            # uploadss.save(os.path.join(app.config['uploads'], filenamess))
            # storage.child(filenamess).put(filenamess)
            # # storage = firebase.storage()
            # data_a = filenamess.split(".")
            # files = storage.list_files()
            # for file in files:
            # 	word=storage.child(file.name).get_url(None)
            # 	if (word.find(data_a[0]) != -1):
            # 		data_url = storage.child(file.name).get_url(None)
            # 		cheque_url = data_url

            # upl = request.files['upl']
            # spl = upl.filename
            # spll = spl.split(".")
            # upl.filenamesss=str(da)+"degree"+"."+spll[1]
            # filenamesss = secure_filename(upl.filenamesss)
            # print(filenamesss)
            # upl.save(os.path.join(app.config['uploads'], filenamesss))
            # storage.child(filenamesss).put(filenamesss)
            # # storage = firebase.storage()
            # data_a = filenamesss.split(".")
            # files = storage.list_files()
            # for file in files:
            # 	word=storage.child(file.name).get_url(None)
            # 	if (word.find(data_a[0]) != -1):
            # 		data_url = storage.child(file.name).get_url(None)
            # 		degree_url = data_url

            c_name = request.form['cname']
            emp_no = request.form['emp']
            talent = request.form['talent']
            join_date = request.form['joining_date']
            full_name_adhar = request.form['full_name']
            dob_adhar = request.form['dob']
            gender = request.form.get('gender')
            martial_status = request.form.get('martial_status')
            marriage_date = request.form['marriage_date']
            passport_no = request.form['passport']
            passport_date = request.form['passport_date']
            pancard_number = request.form['PAN']

            aadhar_no = request.form['aadhar']

            mobile = request.form['mobile']
            email = request.form['email']
            contact_person = request.form['contact_person']
            contact_person_relation = request.form['contact_person_relation']
            contact_person_no = request.form['contact_person_no']
            father_name = request.form['father_name']
            father_date = request.form['father_date']
            mother_name = request.form['mother_name']
            mother_date = request.form['mother_date']
            address = request.form['address']
            city = request.form['city']
            state = request.form.get('state')
            zips = request.form['zip']
            permanent_address = request.form['permanent_address']
            pcity = request.form['pcity']
            pstate = request.form.get('pstate')
            pzip = request.form['pzip']
            bank_name = request.form['bank_name']
            branch = request.form['branch']
            acc = request.form['acc']
            IFSC = request.form['IFSC']
            OLD_PF = request.form['OLD_PF']
            OLD_ESIC = request.form['OLD_ESIC']
            edu = request.form.get('edu')
            dataa = {
                'Company Name': c_name,
                'Employee No': emp_no,
                'talent': talent,
                'Date of Joinig': join_date,
                'Full name': full_name_adhar,
                'DOB': dob_adhar,
                'Gender': gender,
                'Martial Status': martial_status,
                'Date of marriage': marriage_date,
                'Passport No': passport_no,
                'Passport Expiry': passport_date,
                'PAN No': pancard_number,
                'aadhar_no': aadhar_no,
                'Mobile': mobile,
                'Email': email,
                'Contact Person': contact_person,
                'Contact person name': contact_person_no,
                'Contact person relation': contact_person_relation,
                'Father name': father_name,
                'Father DOB': father_date,
                'Mother name': mother_name,
                'Mother DOB': mother_date,
                'Address': address,
                'city': city,
                'state': state,
                'ZIP': zips,
                'Permanent Address': permanent_address,
                'Permanent city': pcity,
                'Permanent state': pstate,
                'Permanent Zip': pzip,
                'Bank Name': bank_name,
                'Bank Branch': branch,
                'Acc No': acc,
                'IFSC no': IFSC,
                'OLD_PF': OLD_PF,
                'OLD_ESIC': OLD_ESIC,
                'Education': edu,
                'adhar_img_front': aadhar_url_front,
                'adhar_img_back': aadhar_url_back,
                'proof_img': proof_url,
                'cheque_img': cheque_url,
                'degree_url': degree_url
            }
            FBConn.post('/data_talentsetu/', dataa)
    return render_template('info.html')