Skip to content

Commit

Permalink
add g.ckan_version and g.ckan_base_version
Browse files Browse the repository at this point in the history
  • Loading branch information
tobes committed Feb 15, 2013
1 parent efe49b3 commit 034c04c
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions ckan/lib/app_globals.py
Expand Up @@ -3,10 +3,12 @@
import logging
import time
from threading import Lock
import re

from paste.deploy.converters import asbool
from pylons import config

import ckan
import ckan.model as model

log = logging.getLogger(__name__)
Expand Down Expand Up @@ -172,6 +174,10 @@ def _check_uptodate(self):
self._mutex.release()

def _init(self):

self.ckan_version = ckan.__version__
self.ckan_base_version = re.sub('[^0-9\.]', '', self.ckan_version)

# process the config_details to set globals
for name, options in config_details.items():
if 'name' in options:
Expand Down

0 comments on commit 034c04c

Please sign in to comment.