Loading repository data…
Loading repository data…
ImmortalRabbit / repository
Задача: спроектировать и разработать API для системы опросов пользователей
A transparent discovery signal based on current public GitHub metadata.
This score does not audit code, security, maintainers, documentation quality, or suitability. Verify the repository and its current documentation before adoption.
Задача: спроектировать и разработать API для системы опросов пользователей
cd pollMaker/
pip install -r requirements.txt
cd pollMaker/
python manage.py makemigrations
python manage.py migrate
python manage.py createsuperuser
python manage.py runserver
curl --location --request GET 'http://localhost:8000/api/login/' \
--form 'username=%username' \
--form 'password=%password'
curl --location --request POST 'http://localhost:8000/api/poll/create/' \
--header 'Authorization: Token %userToken' \
--form 'poll_name=%poll_name' \
--form 'pub_date=%pub_date' \
--form 'end_date=%end_date \
--form 'poll_description=%poll_description'
curl --location --request PATCH 'http://localhost:8000/api/poll/update/[poll_id]/' \
--header 'Authorization: Token %userToken' \
--form 'poll_name=%poll_name' \
--form 'end_date=%end_date \
--form 'poll_description=%poll_description'
curl --location --request DELETE 'http://localhost:8000/api/poll/update/[poll_id]/' \
--header 'Authorization: Token %userToken'
curl --location --request GET 'http://localhost:8000/api/poll/view/' \
--header 'Authorization: Token %userToken'
curl --location --request GET 'http://localhost:8000/api/poll/view/active/' \
--header 'Authorization: Token %userToken'
one, multiple or textcurl --location --request POST 'http://localhost:8000/api/question/create/' \
--header 'Authorization: Token %userToken' \
--form 'poll=%poll' \
--form 'question_text=%question_text' \
--form 'question_type=%question_type \
one, multiple or textcurl --location --request PATCH 'http://localhost:8000/api/question/update/[question_id]/' \
--header 'Authorization: Token %userToken' \
--form 'poll=%poll' \
--form 'question_text=%question_text' \
--form 'question_type=%question_type \
curl --location --request DELETE 'http://localhost:8000/api/question/update/[question_id]/' \
--header 'Authorization: Token %userToken' \
--form 'poll=%poll' \
--form 'question_text=%question_text' \
--form 'question_type=%question_type \
curl --location --request POST 'http://localhost:8000/api/choice/create/' \
--header 'Authorization: Token %userToken' \
--form 'question=%question' \
--form 'choice_text=%choice_text'
curl --location --request PATCH 'http://localhost:8000/api/choice/update/[choice_id]/' \
--header 'Authorization: Token %userToken' \
--form 'question=%question' \
--form 'choice_text=%choice_text'
curl --location --request DELETE 'http://localhost:8000/api/choice/update/[choice_id]/' \
--header 'Authorization: Token %userToken' \
--form 'question=%question' \
--form 'choice_text=%choice_text'
curl --location --request POST 'http://localhost:8000/api/answer/create/' \
--header 'Authorization: Token %userToken' \
--form 'poll=%poll' \
--form 'question=%question' \
--form 'choice=%choice \
--form 'choice_text=%choice_text'
curl --location --request PATCH 'http://localhost:8000/api/answer/update/[answer_id]' \
--header 'Authorization: Token %userToken' \
--form 'poll=%poll' \
--form 'question=%question' \
--form 'choice=%choice \
--form 'choice_text=%choice_text'
curl --location --request DELETE 'http://localhost:8000/api/answer/update/[answer_id]' \
--header 'Authorization: Token %userToken'
curl --location --request GET 'http://localhost:8000/api/answer/view/[user_id]' \
--header 'Authorization: Token %userToken'