mdn/django-locallibrary-tutorial
关于
使用 Django 编写的 Local Library 网站;MDN 服务端开发 Django 模块的示例:https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django。
网站与应用开发实测星标增长
- 24小时
- 0
- 7天
- +1
- 15天
- +1
- 1个月
- 0
各周期内的星标净变化,周期相互重叠,并非每日新增。缺失的测量保持空白。星标代表关注度,不代表软件质量。
README.md
原文Django Local Library
Tutorial "Local Library" website written in Django.
For detailed information about this project see the associated MDN tutorial home page.
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.

Quick Start
To get this project up and running locally on your computer:
Set up the Python development environment.
Note: This has been tested against Django 6.1, which requires Python 3.12 or later.
Create and activate a Python virtual environment for the project using venv, the virtual environment tool built into Python:
# Linux/macOS python3 -m venv django6_env source django6_env/bin/activate # Windows py -3 -m venv django6_env django6_env\Scripts\activateAssuming your virtual environment is active, run the following commands (if you're on Windows you may use
pyorpy -3instead ofpythonto 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 runserverOpen a browser to
http://127.0.0.1:8000/admin/to open the admin siteCreate a few test objects of each type.
Open tab to
http://127.0.0.1:8000to see the main site, with your new objects.
探索相关项目
加载中…