Git Product home page Git Product logo

library-management's Introduction

Library Management

Short overview of Django rest framework & api

General

  • install requirements.txt
    pip install -r requirements.txt
  • Note that mysql database is used, therefore, after configuring database, populate it with Book objects


api/

APIs to list all books; create, update and delete objects from Book model

api/serializers.py

initialize the Book model with a serializer

api/views.py

contains functions based views for APIs to

  • display overview of API links
  • list all objects from Book
  • create, update and delete objects from Book


library_app/

library_app/models.py

contains Book Model



library_management/

django source folder containing settings.py



myadmin/

Admin can create, update and delete objects from Book

myadmin/forms.py

  • myAdminForm() module (Admin Sign Up form):
    • inherits from django's UserCreationForm
    • makes 'email' as a required field
    • overrides save() method to implement 'admin' status to User

  • adminLoginForm() module (Admin Login form):
    • inherits from django's AuthenticationForm
    • sets username as EmailField

myadmin/utils.py

  • EmailBackend() module:
    • implements authenticate() method to authenticate using 'email' instead of django's default authentication using 'username'

myadmin/views.py

implements function based views for Admin - sign up, login & dashboard

student/

Student can only see all objects from Book

student/forms.py

implements similar features as myadmin/forms.py to a student user

  • studentSignUpForm() module (Student Sign Up form):
    • inherits from django's UserCreationForm
    • makes 'email' as a required field
    • overrides save() method to implement 'admin' status to User

  • studentLoginForm() module (Student Login form):
    • inherits from django's AuthenticationForm
    • sets username as EmailField

student/views.py

implements function based views for Student - sign up, login & dashboard

library-management's People

Contributors

abhi-54 avatar

Stargazers

 avatar  avatar

Watchers

 avatar  avatar

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.