This assignment is to write a question-and-answer application like Stack Overflow. It is due on April 5, 2016.
This is a team assignment, so you must complete and submit it with your team.
- March 30
- Added note that the user's vote should be indicated.
In this assignment, you will be writing a Q&A site like Stack Overflow. Your site will not have nearly so many features as Stack Overflow, but it will still be the most complex application you have built so far.
You'll make good use of the following:
- Python & Flask
- HTML & CSS
- User sessions and authentication
- Storing data in a database with SQLAlchemy
Assignment 2 has significant conceptual overlap with several parts of this assignment.
Your application needs to support the following:
- Users can create accounts, log in, and log out. Accounts should be protected with a username and password.
- Users can post questions; each question has a subject (as a
textinput field) and a question body (as a
textarea); the question body should be treated as Markdown.
- The front page should display:
- The log in/out/current user controls
- A link or button to ask a question
- The 25 most recently-asked questions (their titles, ask dates, who asked them, and how many answers they have).
- Questions should have their own pages, with URLs like
/questions/2310, that display:
- The question
- The answers
- A form to post an answer to a question
- A link back up to the main index
- When a user posts a question or an answer, the POST handler should redirect them to the question's page.
- Add support for voting on answers:
- For each answer in the question page, show vote up/down buttons and the net votes received (upvotes minus downvotes).
- Sort answers by votes, with the most highly-rated answer at the top.
- If a user has cast a vote, the vote they have cast should be indicated (e.g. the thumbs-up should be filled instead of open).
- Style things with Pure CSS.
- Store all data in an SQLite database using SQLAlchemy.
For this assignment, I am not providing a step-by-step breakdown like I did in earlier assignments.
Add tags, where each question can have one or more tags. The tags should be displayed on both the front page and the question page, and they should be links to a tag page that shows all questions with that tag.