A simple library management system for displaying the online catalog for the library.
- Go to the directory on your machine where you want to store your project repositories:
cd ~/projects
(or something similar) - Clone this repository:
git clone https://github.com/nichatpratik/Library_management_system.git
- Change directory:
cd library
- I have created a virtual environment:
python3 -m venv ENV
- Activate the environment
source ENV/bin/activate
- Install the dependencies:
pip install -r requirements.txt
- Change directories to the django project:
cd library
Now you are all set to run the Django management commands
python manage.py shell
starts the Python interpreter that is Django aware.python manage.py dbshell
starts the shell for SQLite3 (or whatever RDBMS you configure)python manage.py runserver
runs your application on port 8000 (point your browser at http://127.0.0.1:8000)python manage.py test catalog
runs the test suite in thecatalog/tests.py
filepython manage.py makemigrations
checks for changes to your models and makes a migration filepython manage.py migrate
converts migration files to SQL and implements the changes in the database
- 5 models - Book, Author, BookInstance, Genre and Language
- Book and author models are connected - foreign key. Book and Genre are connected using a many to many connection. Book and Language is connected - foreign key.
- 6 views - HomePage (index), BookList, BookDetailView, AuthorDetailView, ContactView. 6 Templates wrt to the views and a base template.
- One contact us form with template.
- Used Bootstrap along with my own CSS styles to style the pages.
- Included hyperlinks in the base template (Navigation panel) for good navigable website.
- Used Developed and customized Django admin site to accept data (Data creation) as well as display the data (list view).
Bonus features:
- Deployed the website on Heroku: https://library3104248805.herokuapp.com/
- Developed a login and logout feature to authenticate the users.
- Included session management - tracing visitor's activity on the homepage to show how many times a particular user (not necessary logged in) visited the website.