diff --git a/README.md b/README.md index 0210e46224bc21fb13bb9fd99118a45646593653..17c0c9ed057282435c5acc6d96df47e269fc7e5e 100644 --- a/README.md +++ b/README.md @@ -1,2 +1,86 @@ -# term-2-lab +# term-2-lab +**This README file include:- Lab 12 part 2 and my_app** +**my_app** + + +**URL** +http://www.doc.gold.ac.uk/usr/417/login +http://www.doc.gold.ac.uk/usr/417/register +http://www.doc.gold.ac.uk/usr/417/viewbucket +http://www.doc.gold.ac.uk/usr/417/ +http://www.doc.gold.ac.uk/usr/417/bucketlist +http://www.doc.gold.ac.uk/usr/417/index +http://www.doc.gold.ac.uk/usr/417/api + + +**Commits** +https://gitlab.doc.gold.ac.uk/jsilv003/term-2-lab/commits/master + + + +**About** +I have tried to create a BucketList for tourist destinations, users can collectively create a bucketlist +Can register, login and logout with the credentials + +used sqlalchemy + + + +**Requirements for app and where they are located:-** + +| File Name | Criteria | Line Number | +|-------------|-----------|-------------| +|models.py |it is a flask app |14 | +|routes.py |there is more than one route and more than one view |19,23,36,51,66,72| +|login.html, register.html, index.html,bucketlist.html | the html is rendered using jinja templates +| login.html | the jinja templates include some control structure(S) e.g. if/else, for/endfor | | +| forms.py | it includes one or more forms | | +| routes.py | the forms have some validation | 77 | +|routes.py | there are useful feedback messages to the user | 59 | +| (uses sqlalchemy )|it has a database backend that implements CRUD operations (the database can be mysql or mongodb) | | +| | the create & update operations take input data from a form or forms | | +| routes.py | there is user authentication (i.e. logins) | 51 | +| | the login process uses sessions | | +| models.py | passwords should be stored as hashes | 31 | +| routes.py | there is a way to logout | 66 | +| routes.py | there is a basic api i.e. content can be accessed as json via http methods | 86 | +| routes.py | it should be clear how to access the api (this could include comments in code) | 86 | + + +**Please note, the requirements listed below are discretionary and you can earn up to maximum of 10% for these or similar extensions: ** + + +| File Name | Criteria | Line Number | +|-------------|-----------|-------------| +|routes.py | using wtforms is not required but is recommended | | +| routes.py | use of flask-login is not required but is recommended | | +| | using a salt is not required but is recommended | | +| routes.py | additional credit will be given for an api that implements get,post,push and delete | | +| | use of flask-restful is not required but is recommended | | +| config.py | using sqlalchemy is not required but will attract credit | | + + +**Lab 12 Part 2** + +| File Name | Short desciption | +|-------------|------------| +| decorator_1.py | It gets called before a function.| +| decorator_timer.py | it shows the time it took to run the function| +| headline.py | it reads the rss feeds and gets the title, publishing year and article summary, without the the use of template.| +| headlines_if.py | it shows the headlines from the BBC rss feed but it can take a certain word to display the article.| +| headlines.py | it prints hello, world on the page.| +| hello_world_with_templates.py | it prints hello, world on the page with the template| +| home.html | it is a html template form the home page as it Contains code that displays the greeting on a web page | +| if_name_test.py | | +| macros.py | it contains four routes, which allows the different words to be displayed on the web page. +| random_headline.py | displayes the random headline from the BBC rss feed. | +| random_letters.py | Prints out "Hello World!", when at the end of url if you add "/word". It prints "nTeGYujHDBkkYumubZYefaNdbLNWTLIj", it contains upper and lowercase letters the length of 32 | +| show_time.py | it prints Hello world on the page and when you add "/time" it prints the time and the user has to refresh it to see the time. | +| show_time_with_filter.py | it prints Hello world on the page and it uses "show_time_with_filter.html" template when you add "/time" it prints the time, with template implemented on the page and the user has to refresh it to see the time.| +| templates (folder) | this contains html files. there are 8 html files, which are associated with everysinle page that prints out.| +| url_for.py | it prints "this route is root" on the page with the template and when you add "/login" at the end of url it redirect to department of computing.| +| url_for_using_vs_url_for.py | it prints "this route is root" on the page with the template and bringd all modules to make the login page and redirecting to the homepage | +| username.py | it prints "Hello, Username" show the user profile for that user | +| vs_url_for.py | it returns the url, which was putted from previous modules and it redirects to the server with a ID.| +| whats_my_name.py | it prints the name in the format, which is given. |