Skip to content

Latest commit

 

History

History
51 lines (32 loc) · 2.97 KB

README.md

File metadata and controls

51 lines (32 loc) · 2.97 KB

QuestionBox

You want to make an application where people can crowdsource their questions and get answers. You are going to build a web application that has these goals:

  • Users can view questions and answers
  • Registered users can ask questions
  • Registered users can add answers to any question
  • The question's creator can mark answers as correct
  • Registered users can "star" questions and answers they like

Getting started

This project has already been created from the Momentum Django template. You still need to run the following commands:

pipenv install
cp project/.env.sample project/.env
pipenv shell
./manage.py migrate

You also need to create a Django app.

This project requires the use of PostgreSQL as its database, and must be deployed to Heroku. You should set both of those up first thing.

How questions and answers work

Questions have a title and a body. Allow your users to use Markdown for authoring question bodies. django-markdownify can turn Markdown into HTML for you in the template. Questions cannot be edited once they have been asked. A question can be deleted by its author. If it is deleted, all associated answers should also be deleted.

Answers just have a body and are connected to a question. Answers can also use Markdown.

Every question and every answer should be associated with a user. A user should be able to view all their questions on a user profile page.

Users can search the site for questions. When they search, this should search the questions and all answers for them. This should use PostgreSQL full-text search.

How much of this is JavaScript and Ajax?

"Starring" questions and answers and marking answers as correct should happen via Ajax and you will need to build a view that handles JSON to do this.

The rest of the application can be plain old Django views, although you can use JavaScript and Ajax if you want to enhance things. Answering a question is an excellent place to use Ajax if you get a chance.

Making this project your own

You should try something you don't already know how to do on your project. This could be a Python or JavaScript library you haven't used before or a feature of Django you haven't tried.

Some ideas: