Write 2 more tests for the entry form:
- One that tests for messages longer than 300 chars not being submitted.
- One that tests for message with zero chars not being submitted
Change the code, that the tests from exercise 1 pass. Hint: It it fairly simple with web2py's DAL. Maybe you should have a look at web2py's docs.
Add some more information to the
profile
page - like in the image below. Style this info accordingly. Hint: You don't need to change the database model.Make the date shown on the messages prettier.
Think about the 'message' model. Could we add some fields that make sense?
Killer-Exercise: Put a delete link in each individual message. After the link is clicked, the message should be deleted and the user should be redirected to his profile page. Hint: You should write a new function, use proper error handling and us the
crud.delete()
method.
Comments
Leave a reply →