DAVID MALAN: All right.
And now one final flourish, a personal touch that
really makes CS50 Finance your own.
Now, in addition to changing the aesthetics of the site, which
you are welcome to do-- which is particularly easy because
of our use of Bootstrap.
Indeed per the specification, we point you at some alternative themes
or templates that you can use, simply changing the Bootstrap
URL to some other that will completely change
the colors and aesthetics of your site in one fell swoop.
But for this personal touch, we're looking for something functional.
We're looking for a change to your Python code that actually gives
the user some new feature to enjoy.
So among the possibilities are these-- empowering
users to change their passwords.
So once a user is already logged in, if you
want to empower him or her to change their password,
probably you're going to need some kind of form
and you're probably going to need some kind of route
that actually handles the processing of that form,
and specifically changes that user's table, storing not their password
per se, but that same hash thereof, a la register.
You can empower users to add additional cache [? to ?] [? their ?] account.
Now, in the real world you would actually
have to deposit physical money into a bank
or send someone a check or some other mechanism.
Here it suffices just to type how much more money
you want to add to your account and, implemented as such, again,
modifying most likely the user's table.
But again, error checking as always, so that if you
type in alphabetical characters or negative characters
or anything else that isn't an actual dollar amount, odds are you're
going to want to apologize to the user.
You might also empower users to buy more shares
or sell shares of stock they already own via your index route itself.
So recall that after you've logged in, you
see that HTML table of your entire portfolio-- all of the stocks you own
and how much cash you have.
But by default, we force the user to go to a buy page or a sell page,
where they need to manually input the symbol and number of shares
that they want to buy or sell.
This seems logically unnecessary because you already
know which symbols a user owns, and you already
know how many shares he or she owns of those stocks.
So surely, you could programmatically, on that index page,
display for the user some hyperlinks that allow them to simply click
or maybe [INAUDIBLE] HTML form buttons that
allows them to click those and begin the process of buying or selling instantly.
So we leave it to you to decide exactly how you might implement this.
But this is arguably a better user experience,
because it's a lot easier to buy and sell,
and you don't have to remember the symbols yourself by typing them in
manually, as is the default scenario.
And then lastly, empower users with some other feature of comparable scope.
Deliberately generally written, you're welcome to consult
your TF or the course's heads as to what's reasonable scope.
But in general, this should take a number of lines of code
that actually give your website some newfound capability, some new feature
that's compelling, that's very much in the spirit of these others.