当前位置:   article > 正文

cs11 Python flask Python

cs11 Python flask Python
Lab 3: Basic Flask Site
In this assignment you will make a basic social networking site using Python3,
Flask, and Jinja2. You have been provided a JSON file containing basic profile data for a number of users (name, email, userid, birthday, friends). You are required to create a Jinja2 template for a profile page for a generic user, to be passed in using Flask’s render_template function. This template will be served on the route “/users/<int:uid>”.
URLs that match a user id from the JSON file should return the template filled out with that user’s data as described below. URLs that do not match any user’s id should return a static error page and a 404 status code.
Note for this assignment you are required to use Python3, Flask, and Jinja2. Do not use other technologies or frameworks can be substituted server-side. You are not required to create a home page or any other pages other than the user pages.
Requirements:
● User profiles MUST display the following data
○ First name
○ Last name
○ Email address
○ Date of birth
○ List of friends
■ Elements in the list should link to friend’s profiles
■ Link text must be the friend’s first and last name
● For example, if the friend is named Sorley Nandag with user
id 12345, the link would be <a href=”/users/12345”>Sorley
Nandag</a>
● CSS
○ Your CSS must validate
○ The page should have some styling to it, and it should look clean and easy
to use.
Submission:
Submit all your files in a compressed zip file named lab3.zip. Include a README with any additional information, if needed.
Acknowledgment
This assignment is based on homework assignments used by Brian Dickinson and Eustrat Zhupa for the same course.
声明:本文内容由网友自发贡献,不代表【wpsshop博客】立场,版权归原作者所有,本站不承担相应法律责任。如您发现有侵权的内容,请联系我们。转载请注明出处:https://www.wpsshop.cn/w/知新_RL/article/detail/166728
推荐阅读
相关标签
  

闽ICP备14008679号