Changeset 5451
- Timestamp:
- 06/09/07 21:00:46 (2 years ago)
- Files:
-
- django/trunk/AUTHORS (modified) (1 diff)
- django/trunk/django/conf/global_settings.py (modified) (1 diff)
- django/trunk/django/core/management.py (modified) (2 diffs)
- django/trunk/django/__init__.py (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
django/trunk/AUTHORS
r5403 r5451 235 235 Dan Watson <http://theidioteque.net/> 236 236 Chris Wesseling <Chris.Wesseling@cwi.nl> 237 James Wheare <django@sparemint.com> 237 238 charly.wilhelm@gmail.com 238 239 Rachel Willmer <http://www.willmer.com/kb/> django/trunk/django/conf/global_settings.py
r5380 r5451 242 242 # The User-Agent string to use when checking for URL validity through the 243 243 # isExistingURL validator. 244 URL_VALIDATOR_USER_AGENT = "Django/0.96pre (http://www.djangoproject.com)" 244 from django import get_version 245 URL_VALIDATOR_USER_AGENT = "Django/%s (http://www.djangoproject.com)" % get_version() 245 246 246 247 ############## django/trunk/django/core/management.py
r5355 r5451 4 4 import django 5 5 from django.core.exceptions import ImproperlyConfigured 6 import os, re, shutil, sys, textwrap7 6 from optparse import OptionParser 8 7 from django.utils import termcolors 8 import os, re, shutil, sys, textwrap 9 9 10 10 # For Python 2.3 11 11 if not hasattr(__builtins__, 'set'): 12 12 from sets import Set as set 13 14 # For backwards compatibility: get_version() used to be in this module. 15 get_version = django.get_version 13 16 14 17 MODULE_TEMPLATE = ''' {%% if perms.%(app)s.%(addperm)s or perms.%(app)s.%(changeperm)s %%} … … 93 96 # field as the field to which it points. 94 97 get_rel_data_type = lambda f: (f.get_internal_type() in ('AutoField', 'PositiveIntegerField', 'PositiveSmallIntegerField')) and 'IntegerField' or f.get_internal_type() 95 96 def get_version():97 "Returns the version as a human-format string."98 from django import VERSION99 v = '.'.join([str(i) for i in VERSION[:-1]])100 if VERSION[-1]:101 v += '-' + VERSION[-1]102 return v103 98 104 99 def get_sql_create(app): django/trunk/django/__init__.py
r4914 r5451 1 1 VERSION = (0, 97, 'pre') 2 3 def get_version(): 4 "Returns the version as a human-format string." 5 v = '.'.join([str(i) for i in VERSION[:-1]]) 6 if VERSION[-1]: 7 v += '-' + VERSION[-1] 8 return v
