This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#handler for deleting todos. | |
def delete_handler(): | |
return |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#handler for updating todos | |
def update_handler(): | |
updatedToDo = dict() | |
print('Enter to do id') | |
toDoId = input() | |
print('Enter name, leave as blank if update not required ') | |
name = input() | |
if(name != ""): | |
updatedToDo["name"] = name | |
print('Enter description, leave as blank if update not required ') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#handler for display operations | |
def show_handler(): | |
todos = todo.find({}) | |
flag = False | |
print("------------------------TODO----------------------------") | |
for item in todos: | |
print('name : ',item["name"],'| description : ',item["description"],'| status',item["status"]) | |
flag = True | |
if(not flag): | |
print('You have not added any todo yet !!!!') |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#handler to handle the insert operation | |
def insert_handler(): | |
print('--------ADDING A NEW TO DO--------') | |
print('Insert name of to-do') | |
name = input() | |
print('Insert description of todo') | |
description = input() | |
insertStatus = insert_todo({ | |
"name" : name, | |
"description" : description, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
if(!await User.emailIdAlreadyTaken(email)){ | |
console.log("Email id already taken") | |
} | |
else{ | |
console.log("Eligible for account creation") | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const user = new User({ | |
name, | |
password | |
}) | |
await user.generatePassword() | |
/* we can write as many method functions in between as well*/ | |
await user.save() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
const mongoose = require('mongoose') | |
var bcrypt= require('bcrypt') | |
const UserSchema=mongoose.Schema({ | |
name : { | |
type : String | |
}, | |
password : : { | |
type : String | |
} | |
}) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
.line{ | |
animation: line-length 3s ease-in-out infinite; | |
} | |
#hand-boy,#hand-note-boy{ | |
animation: rotate 3s ease-in-out infinite; | |
} | |
@keyframes line-length{ | |
0%{ | |
transform : translate(-90.21711px,-178.25098px); | |
opacity: 0.1; |
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
NewerOlder