Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/mdn/django-locallibrary-tutorial
Local Library website written in Django; example for the MDN server-side development Django module: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django.
https://github.com/mdn/django-locallibrary-tutorial
demo django python web-app
Last synced: 19 days ago
JSON representation
Local Library website written in Django; example for the MDN server-side development Django module: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django.
- Host: GitHub
- URL: https://github.com/mdn/django-locallibrary-tutorial
- Owner: mdn
- License: cc0-1.0
- Created: 2016-11-02T08:49:11.000Z (about 8 years ago)
- Default Branch: main
- Last Pushed: 2024-08-19T02:36:19.000Z (3 months ago)
- Last Synced: 2024-10-02T00:24:24.162Z (about 1 month ago)
- Topics: demo, django, python, web-app
- Language: Python
- Homepage:
- Size: 321 KB
- Stars: 1,599
- Watchers: 77
- Forks: 944
- Open Issues: 3
-
Metadata Files:
- Readme: README.md
- Contributing: CONTRIBUTING.md
- License: LICENSE
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
# Django Local Library
Tutorial "Local Library" website written in Django.
For detailed information about this project see the associated [MDN tutorial home page](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/Tutorial_local_library_website).
## Overview
This web application creates an online catalog for a small local library, where users can browse available books and manage their accounts.
The main features that have currently been implemented are:
* There are models for books, book copies, genre, language and authors.
* Users can view list and detail information for books and authors.
* Admin users can create and manage models. The admin has been optimised (the basic registration is present in admin.py, but commented out).
* Librarians can renew reserved books.![Local Library Model](https://raw.githubusercontent.com/mdn/django-locallibrary-tutorial/master/catalog/static/images/local_library_model_uml.png)
## Quick Start
To get this project up and running locally on your computer:
1. Set up the [Python development environment](https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django/development_environment).
We recommend using a Python virtual environment.
> **Note:** This has been tested against Django 3.10 (and may not work or be "optimal" for other versions).
1. Assuming you have Python setup, run the following commands (if you're on Windows you may use `py` or `py -3` instead of `python` to start Python):
```
pip3 install -r requirements.txt
python3 manage.py makemigrations
python3 manage.py migrate
python3 manage.py collectstatic
python3 manage.py test # Run the standard tests. These should all pass.
python3 manage.py createsuperuser # Create a superuser
python3 manage.py runserver
```
1. Open a browser to `http://127.0.0.1:8000/admin/` to open the admin site
1. Create a few test objects of each type.
1. Open tab to `http://127.0.0.1:8000` to see the main site, with your new objects.