• 首页 首页 icon
  • 工具库 工具库 icon
    • IP查询 IP查询 icon
  • 内容库 内容库 icon
    • 快讯库 快讯库 icon
    • 精品库 精品库 icon
    • 问答库 问答库 icon
  • 更多 更多 icon
    • 服务条款 服务条款 icon

python+django的图书馆借阅可视化管理系统#毕业设计

武飞扬头像
wqq6310855
帮助1

开发环境

项目编号:py235基于python django的图书馆借阅可视化管理系统#毕业设计
开发语言:Python
python框架:django
软件版本:python3.7/python3.8
数据库:mysql 5.7或更高版本
数据库工具:Navicat11
开发软件:PyCharm/vs code
前端框架:vue.js

项目介绍

随着我国社会的进步和教育的改革,很多中学都建立的自己的图书馆,但是因为中学还是以学业为主,所以在图书管理方便的管理一般还是比较落后的,尤其是对一些中小城市的中学来说都还没有自己的图书馆管理系统,仍处于图书管理人员手动管理的时代,这明显和我国的教育改革有些不太协调了,为了改善这一现状我们开发了本次的图书馆信息管理系统。

随着时代的发展和教育事业的改革,传统的中学图书馆服务模式已经不能够满足当前快速发展的图书借阅需求了,传统的中学图书馆管理模式效率低下,查询困难,有很多的弊病。为了能够给中学的图书管理人员和图书借阅证提供开一个可靠的管理平台,我们通过Python语言和django技术开发了本次的丹凤中学图书馆信息管理系统。本系统从图书馆人员的角度出发,整个系统围绕图书借阅展开,这不仅改善了图书馆的工作模式而且改善了服务质量,极大的提高了图书借阅相关信息的管理效率。通过本系统图书馆内的管理人员可以更加方便快捷的对图书借阅的各种信息进行管理。同时提高了图书借阅相关信息的服务质量。

系统截图

学新通
学新通
学新通
学新通

关键代码

import datetime
from django.shortcuts import render, redirect
from django.contrib import messages
from django.template import loader, RequestContext
from django.http import HttpResponse
from tushu.models import *

from django.http import JsonResponse
def bookinfo_add(request):  # 增加的操作
    if request.method == "GET":
        leixings = Leixing.objects.all()
        return render(request, 'bookinfo_add.html', context={"leixings": leixings})
    else:
        bianhao = request.POST.get("bianhao")
        bookname = request.POST.get("bookname")
        leixing = request.POST.get("leixing")
        zuozhe = request.POST.get("zuozhe")
        chubanshe = request.POST.get("chubanshe")
        chubanriqi = request.POST.get("chubanriqi")
        jiage = request.POST.get("jiage")
        cishu = request.POST.get("cishu")
        Bookinfo.objects.create(bianhao=bianhao,bookname=bookname,leixing=leixing,zuozhe=zuozhe,chubanshe=chubanshe,chubanriqi=chubanriqi,jiage=jiage,cishu=cishu)
        messages.success(request, "操作成功")
        return render(request, 'bookinfo_add.html')

def bookinfo_delete(request):  # 删除的操作
    id = request.GET.get("id")
    Bookinfo.objects.filter(id=id).delete()  # 在book表里删除该条记录
    messages.success(request, "操作成功")
    bookinfos = Bookinfo.objects.all()
    return render(request, 'bookinfo_list.html', context={"bookinfos": bookinfos})

def bookinfo_list(request):  # 列表操作
    bianhao = request.POST.get("bianhao")
    bookname = request.POST.get("bookname")
    search_dict = dict()

    # 如果查询条件不为空就写入到字典中
    if bianhao:
        search_dict["bianhao"] = bianhao
    if bookname:
        search_dict["bookname"] = bookname
    # 此处是关键,filter过滤字典中的查询条件
    bookinfos = Bookinfo.objects.filter(**search_dict)
    return render(request, 'bookinfo_list.html', context={"bookinfos": bookinfos})


def bookinfo_list2(request):  # 列表操作
    bianhao = request.POST.get("bianhao")
    bookname = request.POST.get("bookname")
    search_dict = dict()

    # 如果查询条件不为空就写入到字典中
    if bianhao:
        search_dict["bianhao"] = bianhao
    if bookname:
        search_dict["bookname"] = bookname
    # 此处是关键,filter过滤字典中的查询条件
    bookinfos = Bookinfo.objects.filter(**search_dict)
    return render(request, 'bookinfo_list2.html', context={"bookinfos": bookinfos})



def bookinfo_alter(request):  # 列表操作
    if request.method == "GET":#此部分是当用户在页面中点击修改时执行,目的是显示当前的信息
        id = request.GET.get("id")
        result = Bookinfo.objects.filter(id=id).first()  # 根据条件获取到需要查询的信息
        context={

            "id": result.id,
            "bianhao": result.bianhao,
            "bookname": result.bookname,
            "leixing": result.leixing,
            "zuozhe": result.zuozhe,
            "chubanshe": result.chubanshe,
            "chubanriqi": result.chubanriqi,
            "jiage": result.jiage,
            "cishu": result.cishu
        }
        return render(request, 'bookinfo_alter.html',context)  # 向前端传递所有信息
    else:#此部分是当用户点击了更新按钮之后的操作
        id = request.POST.get("id")
        bianhao = request.POST.get("bianhao")
        bookname = request.POST.get("bookname")
        leixing = request.POST.get("leixing")
        zuozhe = request.POST.get("zuozhe")
        chubanshe = request.POST.get("chubanshe")
        chubanriqi = request.POST.get("chubanriqi")
        jiage = request.POST.get("jiage")
        cishu = request.POST.get("cishu")
        Bookinfo.objects.filter(id=id).update(bianhao=bianhao,bookname=bookname,leixing=leixing,zuozhe=zuozhe,chubanshe=chubanshe,chubanriqi=chubanriqi,jiage=jiage,cishu=cishu)
        messages.success(request, "操作成功")
        bookinfos = Bookinfo.objects.all()
        return render(request, 'bookinfo_list.html', context={"bookinfos": bookinfos})


 
学新通

这篇好文章是转载于:学新通技术网

  • 版权申明: 本站部分内容来自互联网,仅供学习及演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,请提供相关证据及您的身份证明,我们将在收到邮件后48小时内删除。
  • 本站站名: 学新通技术网
  • 本文地址: /boutique/detail/tanhibeihh
系列文章
更多 icon
同类精品
更多 icon
继续加载