什么是Django“app”应该是什么意思? [英] What is a Django "app" supposed to mean?

查看:675
本文介绍了什么是Django“app”应该是什么意思?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述



让我们来看一下Web应用程序(for示例)用户登录管理,一些上传功能,操纵上传的文件以及在屏幕上呈现上传的文件。它们都是同一个Web应用程序的一部分。



这些功能是否在项目中是自己的应用程序,还是应该在一起使用单个应用程序?一个Django应用程序是否与Web应用程序相对应,或者对应于与数据库中的几个表格接口的单个​​函数集?

解决方案

Django应用程序是用于完成或维护站点一个方面的一组相关功能。您描述的Web应用程序将被分成至少2个Django应用程序,这取决于您想要处理上传的文件的细节。


I'm new to Django and trying to understand the preferred means of operation when deploying web applications.

Let's say I'm making a web application with (for example) user login management, some uploading functionality, manipulation of uploaded files, and rendering uploaded files on screen. They're all part of the same "web application".

Would each of these functions be its own app in the project, or should these all be together a single app? Is a Django app intended to correspond to a web application, or does it correspond to a single set of functions interfacing with a few tables in the database?

解决方案

A Django app is a group of related functionality used to complete or maintain one aspect of a site. The web application you describe would be separated into at least 2 Django apps, depending on how granular you want to make the handling of the uploaded files.

这篇关于什么是Django“app”应该是什么意思?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆