This is the first step towards building our first full web application: the AirBnB clone. This first step is very important because we will use what we build during this project with all other following projects: HTML/CSS templating, database storage, API, front-end integration…
- Run the file console.py with ./console.py
- Have fun :D
Commands | Function |
---|---|
quit or EOF |
To exit the program |
create <class> |
Creates a new instance |
show <class> <id> |
Prints the string representation of an instance based on the class name and id |
destroy <class> <id> |
Deletes an instance based on the class name and id |
all (class) |
Prints all string representation of all instances based or not on the class name |
update <class> <id> <attribute name> "<attribute value>" |
Updates an instance based on the class name and id by adding or updating attribute |
- Creating instances of User and BaseModel:
- Showing the instances:
Written by Romina Guimaraens and Alejandro Montenegro