Viikkotehtävä 3:n ensimmäinen haaste on tehdä sivustolle kirjautuminen käyttäen tietokannassa olevia tietoja. Tästä aiheesta löytyy nyt lisämalleja:
hieman eri tapaan toteutettu autentikointiesimerkki:
http://users.jyu.fi/~tjlahton/cgi-bin/ties4080/ohjaus3/kirjaudu.cgi/
http://users.jyu.fi/~tjlahton/cgi-bin/ties4080/ohjaus3/kirjaudu.py
http://users.jyu.fi/~tjlahton/cgi-bin/ties4080/ohjaus3/templates/kirjaudu2.h...
ja sama tietokantapohjaisena:
https://appro.mit.jyu.fi/ties4080/ohjaus/ohjaus3/#TOC12
Jos haluaa hieman säästää aikaa ja vaivaa viikkotehtävä 3:ssa, niin saattaa kannattaa asentaa omalle koneelle mysql-tietokanta ja tehdä kehitys suoraan sen avulla. mysql:n asentamiseen ja konfigurointiin ei valitettavasti ole lisäohjeita.
Toinen vaihtoehto on tehdä kehitys sqlite3-tietokannan avulla, mutta tämän siirtäminen pythonanywhereen ja muuntaminen käyttämään mysql-tietokantaa vaatii hieman lisäsäätöjä, jotka kaikki on kyllä kerrottu pääteohjaustehtävässä.
Teitte kummalla tavalla tahansa, niin testatkaa sovellustanne pythonanywheressa ajoissa älkääkä vasta maanantai-iltana. Tässä voi aina tulla mutkia matkaan eikä niiden selvittely ole kivaa viime minuuteilla.