Django python local library

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Local Library website written in Django

License

rootechxs/django_local_library

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Tutorial «Local Library» website written in Django.

For detailed information about this project see the associated MDN tutorial home page.

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

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

  1. Set up the Python development environment. We recommend using a Python virtual environment.
  2. 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 

About

Local Library website written in Django

Источник

Django Tutorial: The Local Library website

The first article in our practical tutorial series explains what you’ll learn, and provides an overview of the «local library» example website we’ll be working through and evolving in subsequent articles.

Prerequisites: Read the Django Introduction. For the following articles you’ll also need to have set up a Django development environment.
Objective: To introduce the example application used in this tutorial, and allow readers to understand what topics will be covered.

Overview

Welcome to the MDN «Local Library» Django tutorial, in which we develop a website that might be used to manage the catalog for a local library.

In this series of tutorial articles you will:

  • Use Django’s tools to create a skeleton website and application.
  • Start and stop the development server.
  • Create models to represent your application’s data.
  • Use the Django admin site to populate your site’s data.
  • Create views to retrieve specific data in response to different requests, and templates to render the data as HTML to be displayed in the browser.
  • Create mappers to associate different URL patterns with specific views.
  • Add user authorization and sessions to control site behavior and access.
  • Work with forms.
  • Write test code for your app.
  • Use Django’s security effectively.
  • Deploy your application to production.

You have learned about some of these topics already, and touched briefly on others. By the end of the tutorial series you should know enough to develop simple Django apps by yourself.

The LocalLibrary website

LocalLibrary is the name of the website that we’ll create and evolve over the course of this series of tutorials. As you’d expect, the purpose of the website is to provide an online catalog for a small local library, where users can browse available books and manage their accounts.

This example has been carefully chosen because it can scale to show as much or as little detail as we need, and can be used to show off almost any Django feature. More importantly, it allows us to provide a guided path through the most important functionality in the Django web framework:

  • In the first few tutorial articles we will define a simple browse-only library that library members can use to find out what books are available. This allows us to explore the operations that are common to almost every website: reading and displaying content from a database.
  • As we progress, the library example naturally extends to demonstrate more advanced Django features. For example we can extend the library to allow users to reserve books, and use this to demonstrate how to use forms, and support user authentication.

Even though this is a very extensible example, it’s called LocalLibrary for a reason — we’re hoping to show the minimum information that will help you get up and running with Django quickly. As a result we’ll store information about books, copies of books, authors and other key information. We won’t however be storing information about other items a library might store, or provide the infrastructure needed to support multiple library sites or other «big library» features.

I’m stuck, where can I get the source?

As you work through the tutorial we’ll provide the appropriate code snippets for you to copy and paste at each point, and there will be other code that we hope you’ll extend yourself (with some guidance).

If you get stuck, you can find the fully developed version of the website on GitHub here.

Summary

Now that you know a bit more about the LocalLibrary website and what you’re going to learn, it’s time to start creating a skeleton project to contain our example.

Found a content problem with this page?

This page was last modified on Jul 3, 2023 by MDN contributors.

Your blueprint for a better internet.

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Django 2.1.11 based local library

graevskiy/local_library

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Local library is a Django tutorial project from MDN located at https://developer.mozilla.org/en-US/docs/Learn/Server-side/Django

First you need Python 3 and probably pip installed. We created it using 3.7.2 version.

It’s highly recommended to install virtualenv and install all packages in it.

If you don’t have virtualenv installed do following:

Once done, activate it and go to project root directory.

Install packages located in requirements.txt.

Project uses SQLite DB in development.

pip install -r requirements.txt

After that it needs to create db.sqlite3 file in current instance, so run:

It is set up and ready to use now.

python manage.py loaddata catalog/fixtures/groups.json python manage.py loaddata catalog/fixtures/dump.json
python manage.py createsuperuser

Источник

Saved searches

Use saved searches to filter your results more quickly

You signed in with another tab or window. Reload to refresh your session. You signed out in another tab or window. Reload to refresh your session. You switched accounts on another tab or window. Reload to refresh your session.

Shahrullo/django-locallibrary

This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Name already in use

A tag already exists with the provided branch name. Many Git commands accept both tag and branch names, so creating this branch may cause unexpected behavior. Are you sure you want to create this branch?

Sign In Required

Please sign in to use Codespaces.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching GitHub Desktop

If nothing happens, download GitHub Desktop and try again.

Launching Xcode

If nothing happens, download Xcode and try again.

Launching Visual Studio Code

Your codespace will open once ready.

There was a problem preparing your codespace, please try again.

Latest commit

Git stats

Files

Failed to load latest commit information.

README.md

Django Local Library Project

If you want to know more detailed information about this project you can check the associated link on MDN

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

Model of the project

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

  1. Set up the Python development environment. We recommend using a Python virtual environment.
  2. 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 

Источник

Читайте также:  Php post use name or id
Оцените статью