| author | ymh <ymh.work@gmail.com> |
| Wed, 27 May 2015 11:54:07 +0200 | |
| changeset 1379 | 5fa85499f703 |
| parent 1377 | da3829c1adfb |
| child 1383 | eb55bae28748 |
| permissions | -rw-r--r-- |
|
1192
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
1 |
__all__ = ["VERSION", "get_version", "__version__"] |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
2 |
|
|
1379
5fa85499f703
revert wrong content-type changes
ymh <ymh.work@gmail.com>
parents:
1377
diff
changeset
|
3 |
VERSION = (1, 56, 03, "final", 0) |
| 0 | 4 |
|
5 |
||
6 |
def get_version(): |
|
7 |
version = '%s.%s' % (VERSION[0], VERSION[1]) |
|
8 |
if VERSION[2]: |
|
9 |
version = '%s.%s' % (version, VERSION[2]) |
|
10 |
if VERSION[3:] == ('alpha', 0): |
|
11 |
version = '%s pre-alpha' % version |
|
12 |
else: |
|
13 |
if VERSION[3] != 'final': |
|
14 |
version = '%s %s %s' % (version, VERSION[3], VERSION[4]) |
|
15 |
return version |
|
16 |
||
17 |
||
18 |
__version__ = get_version() |
|
| 77 | 19 |
|
|
1192
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
20 |
# solve initialization pb |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
21 |
# The pb comes from the initialization of the middlewares |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
22 |
# The is a potential circular reference pb between the following modules : security, indexation model. |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
23 |
# the cause comes from the fact that at one moment, the User model is referenced, using the new django 1.5 django.contrib.auth.get_user_model method |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
24 |
# This method cause the load of all installed apps, causing the circular dependency problem. |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
25 |
# the following code force a "pre-load" of all installed app, solving the dependecy pb. |
|
7a8e74f819bc
Solve circular dependency problem on loading
ymh <ymh.work@gmail.com>
parents:
1180
diff
changeset
|
26 |
# TODO: remove this by reworking ldt dependencies |
|
1362
df60d20f965c
Starting upgrading to Django 1.7: removed module-level get_user_model() calls to adjust for new models loading flow + replaced WSFIHandler() with get_wsgi_application()
ndurand
parents:
1358
diff
changeset
|
27 |
#from django.db.models.loading import get_models |
|
df60d20f965c
Starting upgrading to Django 1.7: removed module-level get_user_model() calls to adjust for new models loading flow + replaced WSFIHandler() with get_wsgi_application()
ndurand
parents:
1358
diff
changeset
|
28 |
#_ = get_models() |