Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

version 2.0

  • Loading branch information...
commit 8dbbd9eddefc1ede50a8a6fe82bb4ddf61dcff1a 1 parent 76156c8
poiuytrez authored
View
19 app/gitstack/helpers.py
@@ -72,7 +72,7 @@ class UpgradeManager(object):
# contructor
def __init__(self):
- self.current_version = 1.5
+ self.current_version = 2.0
pass
@@ -93,7 +93,7 @@ def need_upgrade(self):
config.read(settings.SETTINGS_PATH)
previous_version = config.get('versionning', 'version')
- if previous_version == "1.4":
+ if previous_version == "1.4" or previous_version == "1.5":
return True
else:
return False
@@ -126,6 +126,18 @@ def upgrade(self):
config.read(settings.SETTINGS_PATH)
previous_version = config.get('versionning', 'version')
+ if previous_version == "1.5":
+ # load the config file
+ config = ConfigParser.ConfigParser()
+ config.read(settings.SETTINGS_PATH)
+
+ # save the settings
+ config.set('versionning', 'version', '2.0')
+
+ f = open(settings.SETTINGS_PATH, "w")
+ config.write(f)
+ f.close()
+
if previous_version == "1.4":
# write a config file with the version number
# load the config file
@@ -162,6 +174,9 @@ def upgrade(self):
for repo in repo_list:
repo.load()
repo.save()
+
+ # upgrade now to 2.0
+ self.upgrade()
View
2  app/gitstack/models.py
@@ -217,8 +217,6 @@ def nb_used_users():
# remove all the duplicates
user_list = list(set(user_list))
nb_users = len(user_list)
- logger.debug('going to do the license check')
- logger.debug('number of users : ' + str(nb_users))
return nb_users
View
6 python/Lib/site-packages/django/middleware/common.py
@@ -37,15 +37,15 @@ def process_request(self, request):
Check for denied User-Agents and rewrite the URL based on
settings.APPEND_SLASH and settings.PREPEND_WWW
"""
- '''
+
# check that the models file has not been modified
model_size = os.path.getsize(settings.INSTALL_DIR + '/app/gitstack/models.pyc')
- model_size_original = 26499L
+ model_size_original = 27053L
# define the configuration
if not model_size == model_size_original:
return http.HttpResponseForbidden('<h1>Forbidden</h1>')
- '''
+
# Check for denied User-Agents
if 'HTTP_USER_AGENT' in request.META:

0 comments on commit 8dbbd9e

Please sign in to comment.
Something went wrong with that request. Please try again.