Skip to content

Community Discussion Platform similar to Stack Overflow with Public APIs support | Python, Django, Rest, MySQL, Elastic Search, Haystack

Notifications You must be signed in to change notification settings

manoj-jeswani/except4try

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

10 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

except4try

A platform to get your queries solved. except4try :: analogous to the except block in your program :: always there for you to handle the exceptions raised in your try block. Post/Search the queries, get them answered, get the votes.

Features :

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


Tech Stack

  1. Python
  2. Django
  3. Javascript/Jquery
  4. Elastic Search + Haystack
  5. Bootstrap 4
  6. Django Rest Framework

Instructions for Execution:

  1. 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
  2. pip3 install -r requirements.txt
  3. ./manage.py collectstatic
  4. ./manage.py makemigrations
  5. ./manage.py migrate
  6. ./manage.py runserver

Demo API requests :


  1. Post a question :

import requests

url="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())



  1. 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 requests

url="http://except4try.pythonanywhere.com/api/answers/2" r = requests.get(url) print(r.json())

Demo Login credentials :


username : jesin
password : jesin

About

Community Discussion Platform similar to Stack Overflow with Public APIs support | Python, Django, Rest, MySQL, Elastic Search, Haystack

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages