Refs #25769 -- Updated docs to reflect get_version() uses PEP 0440.
This commit is contained in:
parent
a7752780d9
commit
d45cfefbad
|
@ -8,7 +8,7 @@ from django.utils.lru_cache import lru_cache
|
||||||
|
|
||||||
|
|
||||||
def get_version(version=None):
|
def get_version(version=None):
|
||||||
"Returns a PEP 386-compliant version number from VERSION."
|
"Returns a PEP 440-compliant version number from VERSION."
|
||||||
version = get_complete_version(version)
|
version = get_complete_version(version)
|
||||||
|
|
||||||
# Now build the two parts of the version number:
|
# Now build the two parts of the version number:
|
||||||
|
|
|
@ -79,10 +79,10 @@ except ImportError:
|
||||||
release = version
|
release = version
|
||||||
else:
|
else:
|
||||||
def django_release():
|
def django_release():
|
||||||
pep386ver = get_version()
|
pep440ver = get_version()
|
||||||
if VERSION[3:5] == ('alpha', 0) and 'dev' not in pep386ver:
|
if VERSION[3:5] == ('alpha', 0) and 'dev' not in pep440ver:
|
||||||
return pep386ver + '.dev'
|
return pep440ver + '.dev'
|
||||||
return pep386ver
|
return pep440ver
|
||||||
|
|
||||||
release = django_release()
|
release = django_release()
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ Determining the version
|
||||||
|
|
||||||
Run ``django-admin version`` to display the current Django version.
|
Run ``django-admin version`` to display the current Django version.
|
||||||
|
|
||||||
The output follows the schema described in :pep:`386`::
|
The output follows the schema described in :pep:`440`::
|
||||||
|
|
||||||
1.4.dev17026
|
1.4.dev17026
|
||||||
1.4a1
|
1.4a1
|
||||||
|
|
Loading…
Reference in New Issue