Giter Club home page Giter Club logo

django-project-satvaspace's Introduction

Run project

  1. Склонировать проект: git clone [email protected]:odi1n/django_project_satvaspace.git
  2. Перейти в дерикторию: cd django_project_satvaspace
  3. Изменить файл .env.example на .env
  4. docker‐compose build
  5. Запуск автотестов: docker‐compose up autotests
  6. Запуск Django runserver: docker-compose up runserver

Внимание

  1. После запуска доступен будет по http://0.0.0.0:8000
  2. Админ-панель, данные для входа беруться с .env.example: http://0.0.0.0:8000/admin

Пример вызова API

Действие Тип запроса Ссылка данные
Получить все страницы GET /api/pages/ -
Получить информацию о странице GET /api/pages/50/ Номер страницы

Получить все страницы

На одной странице выводиться - 25 записей

{
    "count": 50,
    "next": "http://localhost:8000/api/pages/?page=2",
    "previous": null,
    "results": [
        {
            "id": 50,
            "title": "Приятель ставить нож монета.",
            "absolute_url": "http://localhost:8000/api/pages/50/"
        },
    ]
}

Получить информацию о странице

{
    "id": 50,
    "title": "Приятель ставить нож монета.",
    "contents": [
        {
            "id": 243,
            "content_audio": null,
            "content_text": null,
            "content_video": {
                "id": 81,
                "created": "2021-11-07 19:21:47",
                "modified": "2021-11-07 19:21:47",
                "title": "Табак сопровождаться тута труп.",
                "counter": 23,
                "link": "https://www.npo.com/",
                "link_subtitles": "http://abi.biz/"
            }
        },
        {
            "id": 244,
            "content_audio": {
                "id": 88,
                "created": "2021-11-07 19:21:47",
                "modified": "2021-11-07 19:21:47",
                "title": "Поезд упор полевой полоска оборот.",
                "counter": 23,
                "link": "http://www.oao.info/",
                "bitrate": 75161,
                "bit_in_second": 413407
            },
            "content_text": null,
            "content_video": null
        },
        {
            "id": 245,
            "content_audio": null,
            "content_text": null,
            "content_video": {
                "id": 82,
                "created": "2021-11-07 19:21:47",
                "modified": "2021-11-07 19:21:47",
                "title": "Торопливый выдержать сбросить запретить дальний некоторый страсть.",
                "counter": 23,
                "link": "http://egorova.info/",
                "link_subtitles": "http://gruppa.biz/"
            }
        }
    ]
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.