Post/Search Questions
Answer/get answered
Vote Questions, Answers and comments and get your content voted too
Rest API support to : get all the available questions,get all the answers specific to a question, programatically post a question, get upvoters/downvoters list
Live demo Link: http://except4try.pythonanywhere.com/
- Python
- Django
- Javascript/Jquery
- Elastic Search + Haystack
- Bootstrap 4
- Django Rest Framework
- Download and install elastic search in your system to get the search feature working. Refer :https://www.digitalocean.com/community/tutorials/how-to-install-and-configure-elasticsearch-on-ubuntu-16-04
- pip3 install -r requirements.txt
- ./manage.py collectstatic
- ./manage.py makemigrations
- ./manage.py migrate
- ./manage.py runserver
- Post a question :
import requestsurl="http://except4try.pythonanywhere.com/api/ask_question/" data={'topic':'Template custom filters in Django','detail':'library not found error being displayed','tags_list':['Python','Django']} r = requests.post(url,auth=('jesin', 'jesin'),data=data) print(r.json())
- Get all the available questions :
import requests
url="http://except4try.pythonanywhere.com/api/all_questions/" r = requests.get(url) print(r.json())
3) Get all the answers corresponding to given question :
import requestsurl="http://except4try.pythonanywhere.com/api/answers/2" r = requests.get(url) print(r.json())
username : jesin
password : jesin