# def post(self,user_id=None):
# params={'user_id':[b'729'],'fstname':[b'acp'],'lstname':[b'acp']}
# print(type(params))
# id = params['user_id'][0].decode()
# print(id)
# user = self.session.query(User).filter(User.user_id==id).update(user_id=params['user_id'],fname=params['fstname'],
# lname=params['lstname'])
# self.session.commit(user)
# return redirect('admin.html')
# ###################################
# def post(self, user_id=None):
# params = {'user_id': [b'729'], 'fstname': [b'acp'], 'lstname': [b'acp']}
# print(type(params))
# user_id = params['user_id'][0].decode()
# print(user_id)
# # Update the record in the database
# self.session.query(User).filter(User.user_id == user_id).update(user_id=params['user_id'],
# fname=params['fstname'], lname=params['lstname'])
# # Commit the changes to the database
# self.session.commit()
# # Re-query the database to get the updated record
# user = self.session.query(User).filter(User.user_id == user_id).one()
# return user
# ##########################
# def post(self, user_id=None):
# params = {'user_id': [b'729'], 'fstname': [b'acp'], 'valid': [b'True']}
# print(type(params))
# id = params['user_id'][0].decode()
# print(id)
# # Update the record in the database
# self.session.query(User).filter(User.user_id == id).update(user_id=params['user_id'],
# fname=params['fstname'], valid=params['valid'])
# # Commit the changes to the database
# self.session.commit()
# # Redirect the user to the admin page
# return redirect('admin.html')
###################
# def post(self, user_id=None):
# params = {'user_id': [b'729'], 'fstname': [b'acp'], 'valid': [b'True']}
# print(type(params))
# id = params['user_id'][0].decode()
# print(id)
# # Update the record in the database
# self.session.query(User).filter(User.user_id == id).update(user_id=params['user_id'][0].decode(),
# fname=params['fstname'][0].decode(),
# valid=params['valid'][0].decode())
# # Commit the changes to the database
# self.session.commit()
# # Redirect the user to the admin page
# return redirect('admin.html')
# ##################################
# def put(self, user_id):
# # Get the data from the request
# first_name = self.get_argument('first_name')
# last_name = self.get_argument('last_name')
# # Create a new Session and update the record in the database
# session = Session()
# session.query(User).filter(User.user_id == user_id).update({'first_name': first_name, 'last_name': last_name})
# session.commit()
par = {'user_id': [b'729'], 'fstname': [b'acp'], 'lstname': [b'acp'],'valid': [b'True']}
params = {key: value[0].decode() for key, value in par.items()}
print(params)
# for key,value in par.items():
# print(key,value)
# key[0]=value
Git And GitHub
# for adding or initialize repository git init # check status# git status # add all folders and file # git add . # If you want add file restored from staged git staged # for git commit # git commit -m "first commit" # set main brach is main# git branch -M main # set remote origin# git remote add origin https://github.com/Akashshere19/dealerApp_kur.git # Remove origin remote git remote remove origin # push your code on git hub# git push -u origin main # push force fully when show -----> ! [rejected] main -> main (non-fast-forward) git push -f origin main # remove initializing# rm -rf .git # showing history of work git log # showing history of work git log --stat # showing history of work git log --graph # showing history of work git log --graph --oneline # switch on another branch git checkout #show set remote git remote -v or git remote -vv # show local branches and last commit git branch -v or git branch -vv # for new ...
Comments
Post a Comment