GitLab now enforces expiry dates on tokens that originally had no set expiration date. Those tokens were given an expiration date of one year later. Please review your personal access tokens, project access tokens, and group access tokens to ensure you are aware of upcoming expirations. Administrators of GitLab can find more information on how to identify and mitigate interruption in our documentation.
| write a simple server script which is capable of serving a web application written in Python | /rhouh001project/mysimpleServer.py |
| retrieve one or more documents or rows from one or more collections or tables | /rhouh001project/cgi-bin/components.py line 38, 39, 40, 88, 89, 90, 91, 142 ; /rhouh001project/cgi-bin/splash.py line 16 |
| iterate over documents returned in a results cursor object | /rhouh001project/cgi-bin/components.py, line 201 to 210 |
| filter and/or sort documents in the result set based on some simple criteria | /rhouh001project/cgi-bin/components.py line 88, 89, 90, 91, 142, 145 |
| perform more advanced filtering and/or aggregation operations in a database query | /rhouh001project/cgi-bin/components.py line 172, 197, 198, 199, 224 |
| handle a POST request made via an HTML form in a server-side script | /rhouh001project/templates/form.py, /rhouh001/templates/register.html |
| demonstrate consideration for Separation of Concerns through the modularisation (separation) of related code | From lab 7 to lab 9, forms are kept in the splash.py file and the html code is kept in the templates folder. For exemple, components.py uses the login.html file |
| demonstrate an awareness of how related data is modelled in the database | line 243 in components.py shows how data enters the database when a flcuk is made |
| design and implement an original functional feature in a Python web app | in the lab 7 submission, I had designed a button to delete an image from the database so it doesnt appear again (for example cat images that arent cats). It did work but I did not add it back to the final part as I thought it could be abused.|
| other relevant extension of the taught material (if applicable) | non applicable |
| make a Python script self-executable | For example, the shebang (#!) on top of components.py |
| utilise a range of Python's built-in functions and methods | In components.py, we import bcrypt in line 13, which was installed on the server. this lets our webserver use a feature that was installed and isnt part of base python, and encrypt passwords for the users of the application.|
| make use of user-defined functions | config.py, myutils.py, tests.py |
| design and implement reuseable functions | config.py, myutils.py, |
| write readable, well-presented code | Most of the lab codes are easily readable, commented and presented. |
## Installation instructions
If you have used any modules or configured any global variables that a tester of your app should be aware of, please detail them here.
For example, in the case of this example app:
+ The app requires Python 3+ and MongoDB 3.2 or later
+ The bcrypt and pymongo modules should be are available from your python environment
+ You should open and set the variables in cgi-bin/config.py to match your configuration
+ To launch,
./simpleServer.py
./mysimpleServer.py
+ Restore the database by running `mongorestore` from the base directory
+ After restoring the database, you can test the app with these login credentials: