Giter VIP home page Giter VIP logo

online_library's Introduction

Backend for web library

Requirements

  • Installed Docker
  • For running in your os python.

Installation

  1. Rename ".env.example" file to ".env"
  2. In cmd on Windows or other shell use command
docker-compose build
docker-compose up
  1. In your browser in your browser go to "localhost:80" or "localhost". You will see message from the site.

What you may next

  1. You can go to "localhost:80/api/docs" for knowing swager.
  2. You can go to "localhost:80/admin" for knowing admin of django web-site.
  3. You can send request to API

About .env file

You can change some settings when you change .env file. Default value docker of mode var telling us that we use docker, but you can change it to "none" and then you can use

python library/manage.py runserver 8001 --insecure

The key insecure tell Django use static files for admin menu in "Debug=" mode.

Table with .env vars below

Переменная Condition Effect Effect, if condition is false
MODE "$MODE" == docker Change host of database postgres on one supported docker Change host of database postgres on one supported default os which has postgres application
DEBUG "$DEBUG" == True DEBUG = True in settings Django DEBUG = False in settings Django
LOAD_DEFAULT_DATABASE "$LOAD_DEFAULT_DATABASE" == True Load test data packet from db.json in database Switch off loading test data in database

About default database

Default database contains 43 authors, 36 books, 3 genres. If you want to login into admin service of Django you can use next. Login "Sasha", password "1111". Don't forget to change the administrator if you will use default database.

online_library's People

Contributors

name-pn avatar

Watchers

 avatar

online_library's Issues

Additional tasks

  • Reduce code in view.py
  • Use python library django-split-settings
  • Switch from unit test to pytest
  • Enable linter support in github actions (flake8, black, isort)
  • Enable code verification for test coverage (codecov)
  • #4

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.