Level 1
For this level you must write a simple web application that generates two pages. You are
given a set of requirements below, these are encoded in a set of tests ( level1_functional.py
in the
starter kit) that your application must pass. The tests correspond to the
functional requirements below.
Functional requirements
-
Welcome to Jobs
As a visitor to the site, when I load the home page I see the title text "Welcome to Jobs".
-
About Page Link
As a visitor to the site, when I load the home page I see a link to another page
with the link text "About". -
About Page
As a visitor to the site, when I click on the link "About" I am taken to
a page that contains the site manifesto, including the words "Jobs is a new, exciting, job posting service like nothing you've seen before!". -
Consistent Design
As a visitor to the site, I notice that all the pages on the site have the same
design with the same colours and fonts used throughout.Each page will have a similar structure and will link to a
common CSS stylesheet.
Unit Tests
There are no unit tests for this level.
Your Task
To achieve these requirements you will need to build a bottle web application that
is able to serve the two HTML pages (Home and About) and the associated
stylesheet. The techniques to do this are covered here:
-
Generating HTML Pages looks at
the Bottle page templating system. -
Testing Python Programs covers
running unit tests.
Getting Started
You should be able to unpack the starter kit and run main.py
to see a very simple
single page web application that is the starting point for your work. You need to extend this
to meet the requirements above. This application is very similar to others that you will
have written in tutorials and so should not present any new problems for you to solve; you
just need to apply the techniques you've already learned.
The functional requirements have been laid out in a suggested ordering. Start by writing
code to meet the first requirement before moving on to the second. Treat each requirement
as a sub-problem. Understand what is asked of you and design a solution, then implement it.
These requirements may seem too trivial to work like this but as they get more complicated
you will benefit from this approach.
Run the functional tests before and after you implement each requirement. You should see
the test fail before, and when you see it pass you know you have a correct solution. This is
known as Test Driven Development – normally you would write the tests yourself to
encode your understanding of the users requirements.
代写CS&Finance|建模|代码|系统|报告|考试
编程类:C++,JAVA ,数据库,WEB,Linux,Nodejs,JSP,Html,Prolog,Python,Haskell,hadoop算法,系统 机器学习
金融类:统计,计量,风险投资,金融工程,R语言,Python语言,Matlab,建立模型,数据分析,数据处理
服务类:Lab/Assignment/Project/Course/Qzui/Midterm/Final/Exam/Test帮助代写代考辅导
E-mail:850190831@qq.com 微信:BadGeniuscs 工作时间:无休息工作日-早上8点到凌晨3点
如果您用的手机请先保存二维码到手机里面,识别图中二维码。如果用电脑,直接掏出手机果断扫描。