Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
pinax app with django-answers
Python
branch: master

Fetching latest commit…

Cannot retrieve the latest commit at this time

Failed to load latest commit information.
apps
deploy
media/css
templates
.gitignore
README
__init__.py
manage.py
requirements.txt
settings.py
urls.py

README

Questions:

GET
curl -u strakh:1234 "http://127.0.0.1:8000/api/questions/"
curl -u strakh:1234 "http://127.0.0.1:8000/api/question/1/"
curl "http://127.0.0.1:8000/api/questions/"
curl "http://127.0.0.1:8000/api/question/1/"

POST
curl -u strakh:1234 "http://127.0.0.1:8000/api/questions/" -F "title=is it friday?"

PUT
curl -u strakh:1234 -H "Accept: application/json" -X PUT "http://127.0.0.1:8000/api/question/3/ -d "question_text=Is%20it%20friday?"

DELETE
curl -u strakh:1234 -X DELETE "http://127.0.0.1:8000/api/question/3/"


Answers:

GET
curl -u strakh:1234 "http://127.0.0.1:8000/api/question/1/answers/"
curl -u strakh:1234 "http://127.0.0.1:8000/api/answer/4/"
curl "http://127.0.0.1:8000/api/question/1/answers/"
curl "http://127.0.0.1:8000/api/answer/4/"

POST
curl -u strakh:1234 "http://127.0.0.1:8000/api/question/1/answers/" -F "answer_text=16:10"

PUT
curl -u strakh:1234 -H "Accept: application/json" -X PUT "http://127.0.0.1:8000/api/answer/4/" -d "answer_text=15:26"

DELETE
curl -u strakh:1234 -X DELETE "http://127.0.0.1:8000/api/answer/4/"
Something went wrong with that request. Please try again.