Due: Thursday April 12, 11pm.
You need to create a web page that is similar to the image below. All the images you need are in this zip file.
This is a feasible assignment, as our TA Scott developed this very page using stupid.css.
Serving. You must use bottle.py, and your main file must be called, as in our class examples, server.py, so that it can be run with the command
python server.py
The page should be served by the top URL. There are two approaches to this. One is to use a template, for example, news.tpl, and write:
@get('/')
define news():
return template('news_template')
(You would have to define a template). Another way is to serve a static HTML file: you can create a subdirectory called html, put a news.html page there, and write:
@route('/'):
return static_file('news.html', root='html', mimetype='text/html')
It is up to you to decide which of these ways to use.
CSS Framework. You must use stupid.css as your css framework. See the examples done in class to see how to link to stupid.css from the head of the web page you are developing.
Quality. You should strive to create a page that is as nice as you can, but in practice, you are going to be graded on three types of things (the detailed rubric will be released soon):
To do the homework, I suggest you proceed as follows:
Some image files are .png; to serve those, do:
@route('/images/<filename:re:.*\.png>') def serve_image(filename): return static_file(filename, root='images', mimetype='image/png')
Create a zip archive of your entire bottle directory, and upload it to the following CrowdGrader assignment: https://www.crowdgrader.org/crowdgrader/venues/view_venue/3720
You may need a CrowdGrader subscription to be able to submit your assignment.