Skip to content
프로젝트

mdn/django-locallibrary-tutorial

GitHub에서 보기

소개

Django로 작성한 Local Library 웹사이트입니다. MDN 서버 측 개발 Django 모듈의 예제입니다: https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django.

웹 및 앱 개발

이 수치를 측정하는 방법

측정된 스타 증가

in 24h
0
in 7 days
+1
in 15 days
+1
in 1 month
0

서로 겹치는 기간의 순증가량이며 일별 합계가 아닙니다. 측정값이 없으면 비워 둡니다. 스타는 관심도를 나타내며 품질을 보장하지 않습니다.

README.md

Original

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.

Local Library Model

Quick Start

To get this project up and running locally on your computer:

  1. Set up the Python development environment.

    Note: This has been tested against Django 6.1, which requires Python 3.12 or later.

  2. 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\activate
    
  3. Assuming your virtual environment is active, 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
    
  4. Open a browser to http://127.0.0.1:8000/admin/ to open the admin site

  5. Create a few test objects of each type.

  6. Open tab to http://127.0.0.1:8000 to see the main site, with your new objects.

관련 프로젝트 살펴보기

불러오는 중…