Skip to content
Snippets Groups Projects
README.md 2.85 KiB
Newer Older
Alexandru Pavel's avatar
Alexandru Pavel committed
# Lab 9: Template README
Alexandru Pavel's avatar
Alexandru Pavel committed

Alexandru Pavel's avatar
Alexandru Pavel committed
Here is a template README file you could include in your final app submission, so that your marker knows exactly where to look for evidence of your learning.

Doing this is another way of showing that you understand the code you wrote!

**Note:** They will also be looking at your commit history, to see how much of the app you wrote from scratch.

## Evidence

| Checklist point | Evidence (filename(s) and line number(s) and/or short desciption) |
|-------------|------------|
Alexandru Pavel's avatar
Alexandru Pavel committed
| write a simple server script which is capable of serving a web application written in Python |	|mysimpleServer.py
| retrieve one or more documents or rows from one or more collections or tables |	|cgi-bin/myserve_cat.py,line 43&44,counts flucks&nice
| iterate over documents returned in a results cursor object |	|cgi-bin/myserve_cat.py,line 36,iterates through results and pulls out the img url and text
| filter and/or sort documents in the result set based on some simple criteria |	|cgi-bin/myserve_cat.py,line 43&44,if id matches it will count flucks&nice
Alexandru Pavel's avatar
Alexandru Pavel committed
| perform more advanced filtering and/or aggregation operations in a database query |	|
Alexandru Pavel's avatar
Alexandru Pavel committed
| handle a POST request made via an HTML form in a server-side script |	|mysimpleServer.py,line 19,handles a request
| demonstrate consideration for Separation of Concerns through the modularisation (separation) of related code |	|cgi-bin/myutils.py,line 12,split in a separate function that can be reused
| demonstrate an awareness of how related data is modelled in the database |	|cgi-bin/myserve_cat.py,lines 14,29-31,43-44,63,70,77
| design and implement an original functional feature in a Python web app |	|new field in flucks document 'is_nice'(works like flucks)
| other relevant extension of the taught material (if applicable) |	|new is nice Button lines 76-82
| make a Python script self-executable |	|mysimpleServer.py, line 1, she-bang
| utilise a range of Python's built-in functions and methods |	|cgi-bin/myserve_cat.py line 8 datetime
| make use of user-defined functions |	|cgi-bin/myserve_cat.py line 3 import db_connect, line 14 executes
| design and implement reuseable functions |	|cgi-bin/myutils.py line 12
Alexandru Pavel's avatar
Alexandru Pavel committed
| write readable, well-presented code | Everywhere?! |

## 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 
+ Restore the database by running `mongorestore` from the base directory
+ After restoring the database, you can test the app with these login credentials:
	- Username: tester
	- Password: password