Newer
Older
## Evidence
| Checklist point | Evidence (filename(s) and line number(s) and/or short desciption) |
|-------------|------------|
| it is a flask app? | Yes it is, app = Flask(__name__), line 16 on mytwits_mysql.py |
| there is more than one route and more than one view | Yes, line: 28, 33, 43, 60, 68, 84, 85, 94, 101 on mytwits_mysql.py |
| the html is rendered using jinja templates | Yes all the .html file in "/my_app/templates/" is rendered using jinja templates |
| the jinja templates include some control structure(S) e.g. if/else, for/endfor | Yes, for exemple on login.html |
| |line 12 : {% if form.username.errors %}, line16: {% endfor %} line 18:{% endif %} etc... |
| it includes one or more forms | yes, line: 8, 12, 17 on forms.py |
| the forms have some validation | yes, line : 9, 10, 13, 15, 18, 19, 20 on forms.py |
| there are useful feedback messages to the user | yes, line : 21 on forms.py |
| it has a database backend that implements CRUD operations (the database can be mysql or mongodb) | create, read, update, delete all dbhelper.py cotain CRUD operations |
| the create & update operations take input data from a form or forms | for exemeple line 71 to 74 on mytwits_mysql.py |
| there is user authentication (i.e. logins) | line 77 "login_user(user) " on mytwits_mysql.py |
| the login process uses sessions | line :77 on mytwits_mysql.py "login_user(user)" |
| passwords should be stored as hashes | hashed = hashlib.sha512((salt + password).encode('utf-8')).hexdigest() db.add_user(username,password,salt,hashed) on mytwits_mysql.py |
| there is a way to logout | line: 97 on mytwits_mysql.py |
| there is a basic api i.e. content can be accessed as json via http methods | can be accessed using the route '/api' @app.route('/api/<username>') |
| it should be clear how to access the api (this could include comments in code) | # with / <username> you can see for single users' api and without you see all the apis "@app.route('/api') @app.route('/api/<username>')" |
| commit history | https://gitlab.doc.gold.ac.uk/thoss003/term-2-lab/commits/master |
| | |
| ## Links | |
| Home Page | http://doc.gold.ac.uk/usr/388 |
| Login | http://doc.gold.ac.uk/usr/388/login |
| Logout | http://doc.gold.ac.uk/usr/388/logout |
| Signup | http://doc.gold.ac.uk/usr/388/signup |
| Add twit | http://doc.gold.ac.uk/usr/388/add_twit |
| Api | http://doc.gold.ac.uk/usr/388/api |
--------------------------------------------------------------------------------