Awesome that we have descriptive error messages coming up to notify users 👍
Some of them come out as plain on a separate HTML page. It's not a bug - it's done intentionally - but @liamcal suggested we could add to the UX for those 🙂
Here is a pic:

List of error messages that come out as plain on a separate HTML page:
The file name in brackets for items in the list indicates in which file(s) the message is being written. (I haven't actually gotten to verify these yet, I've only gone and looked in the files under /back-end)
These come from the lines request.write(). For example, in back_end/user.py:

I quite like the idea of live error messages that display right when you make the mistake, hehe.
For example, I had changed it so that error messages appear live for the signup page, but that was adding onto @jackfrench's code using jQuery for validation of signup details 😃 I just found out that using JavaScript it's possible to change the text in the elements with class=error
I'm not sure how to take into consideration things from the database though — for example, to display an error message saying that a username is already taken on the sign up page, we need to check in the database.
And then if we wanted to make it a live error message (personal taste hehe), we'd need to be able to change the content on the HTML page, and I think there would be a way to do that...? but I am not sure hmm. Maybe sounds like using template language can do that? I'll have to look around for using the template language 🙂 (haven't gotten to see it in action much actually 😛)
EDIT:
Places where we could add an error message:
(e.g. if the largest post_id is only 10, there won't be more than 10 posts. So if someone tries to go to `/view/10000` it should take them to `/404` instead)
Awesome that we have descriptive error messages coming up to notify users 👍
Some of them come out as plain on a separate HTML page. It's not a bug - it's done intentionally - but @liamcal suggested we could add to the UX for those 🙂
Here is a pic:

List of error messages that come out as plain on a separate HTML page:
Username already existsafter you choose a username that is already taken/if you choose a username that is not unique, on sign up page (user.py).Thanks to @Jackywathy on set up ajax on serverside and just-in-time testing for unique usernames
Email is already registeredif the email you use is already in the dbAgain thanks to Jack! here in this commit 1f59c7e
Username and password do not matchfrom sign in (user.py)Username cannot be foundfrom sign in (user.py)Uploaded file type not supportedwhen image type for uploaded profile pic or post image is not valid (user.py,ask.py)signup page fix e09d7d9 & ask page fix 7f73aeb
We couldn't find an uploaded fileif no image is uploaded to post (,user.pyask.py)edit: profile pic isn't necessary on sign up. fixed for ask page 7f73aeb
You are not logged inif you try to post a comment without being logged in (view.py)Yay d19d596 It prevents you from posting a comment in the first place if you're not logged in.
Actually something we could do here is not allow the user to post a comment front end (disable input field or anything) if there is no user_cookie, I'll look into that.
Username is not in dbif you try to go to a URL of a profile that doesn't exist (profile.py)The file name in brackets for items in the list indicates in which file(s) the message is being written. (I haven't actually gotten to verify these yet, I've only gone and looked in the files under
/back-end)These come from the lines

request.write(). For example, inback_end/user.py:I quite like the idea of live error messages that display right when you make the mistake, hehe.
For example, I had changed it so that error messages appear live for the signup page, but that was adding onto @jackfrench's code using jQuery for validation of signup details 😃 I just found out that using JavaScript it's possible to change the text in the elements with
class=errorI'm not sure how to take into consideration things from the database though — for example, to display an error message saying that a username is already taken on the sign up page, we need to check in the database.
And then if we wanted to make it a live error message (personal taste hehe), we'd need to be able to change the content on the HTML page, and I think there would be a way to do that...? but I am not sure hmm. Maybe sounds like using template language can do that? I'll have to look around for using the template language 🙂 (haven't gotten to see it in action much actually 😛)
EDIT:
Places where we could add an error message:
/view/10000won't exist unless you create 10,000 posts), it should redirect to/404. That would require checking the largest post_id in the db though before redirecting(e.g. if the largest post_id is only 10, there won't be more than 10 posts. So if someone tries to go to `/view/10000` it should take them to `/404` instead)