Django应用程序中的版本号 [英] Version number in Django applications
问题描述
我正在开发Django应用程序,并且想要显示该应用程序的版本(这样,发现错误的人就会知道该应用程序的版本并可以提供更好的错误报告)。
I'm working on a Django application and I want to display the version of the application (such that people, who find bugs know the version of the application and can provide better bug reports).
是否有一种普遍接受的方式在Django中存储版本号(我的意思是我的应用程序的版本,而不是Django)?
Is there a universally accepted way to store version number in Django (I mean the version of my application, not Django) ?
推荐答案
似乎设置文件是存储版本号的合理位置。我不认为有任何Django可接受的方式来存储您的个人应用程序的版本号。似乎应该定义一个特定于应用程序的变量。
It seems the settings file would be a reasonable location to store the version number. I don't believe there is any Django accepted way to store a version number of your personal application. It seems like an application specific variable that you should define.
有关从svn中获取版本号的更多信息:自动将SVN版本号获取到程序中
For more information on getting the version number out of svn: Getting SVN revision number into a program automatically
这篇关于Django应用程序中的版本号的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!