From b876916cdae3d1b5c696c2097d7f753e69647c84 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Fri, 20 Apr 2012 17:05:51 -0400 Subject: a patch to spaceless middleware submitted by MITx guys --- askbot/middleware/spaceless.py | 1 + 1 file changed, 1 insertion(+) diff --git a/askbot/middleware/spaceless.py b/askbot/middleware/spaceless.py index 9e6b5503..2f5744af 100644 --- a/askbot/middleware/spaceless.py +++ b/askbot/middleware/spaceless.py @@ -23,4 +23,5 @@ class SpacelessMiddleware(object): """ if 'text/html' in response['Content-Type']: response.content = reduce_spaces_between_tags(response.content) + response['Content-Length'] = str(len(response.content)) return response -- cgit v1.2.3-1-g7c22 From 007c1c25e4724ce9cc6867e25e0362e59d7af1dc Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Fri, 20 Apr 2012 22:30:00 -0400 Subject: added a workaround for the "create_unique" bug in the South version 0.7.3 --- ...field_badgedata_multiple__del_field_badgedata_description__d.py | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) diff --git a/askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py b/askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py index 51817c95..d26bdeb0 100644 --- a/askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py +++ b/askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py @@ -27,7 +27,12 @@ class Migration(SchemaMigration): db.alter_column('askbot_badgedata', 'slug', self.gf('django.db.models.fields.SlugField')(unique=True, max_length=50)) # Adding unique constraint on 'BadgeData', fields ['slug'] - db.create_unique('askbot_badgedata', ['slug']) + try:#work around the South 0.7.3 bug + db.start_transaction() + db.create_unique('askbot_badgedata', ['slug']) + db.commit_transaction() + except: + db.rollback_transaction() -- cgit v1.2.3-1-g7c22 From e46a41e6e4c88c0b6ca96d7a01edcb4e5ab94002 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 21 Apr 2012 09:10:45 -0400 Subject: bumped version --- askbot/__init__.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/askbot/__init__.py b/askbot/__init__.py index d6a34ba8..aaf77511 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -9,7 +9,7 @@ import smtplib import sys import logging -VERSION = (0, 7, 41) +VERSION = (0, 7, 42) #keys are module names used by python imports, #values - the package qualifier to use for pip -- cgit v1.2.3-1-g7c22 From f63064d6c419e2273e655f7387bed868f514dfdd Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 21 Apr 2012 09:37:43 -0400 Subject: added test for django-avatar, if avatar is in the INSTALLED_APPS --- askbot/startup_procedures.py | 23 +++++++++++++++++++---- 1 file changed, 19 insertions(+), 4 deletions(-) diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py index e890fb89..9678fdf1 100644 --- a/askbot/startup_procedures.py +++ b/askbot/startup_procedures.py @@ -160,7 +160,7 @@ the list of MIDDLEWARE_CLASSES in your settings.py - these are not used any more middleware_text = format_as_text_tuple_entries(invalid_middleware) raise AskbotConfigError(error_message + middleware_text) -def try_import(module_name, pypi_package_name): +def try_import(module_name, pypi_package_name, short_message = False): """tries importing a module and advises to install A corresponding Python package in the case import fails""" try: @@ -168,9 +168,10 @@ def try_import(module_name, pypi_package_name): except ImportError, error: message = 'Error: ' + unicode(error) message += '\n\nPlease run: >pip install %s' % pypi_package_name - message += '\n\nTo install all the dependencies at once, type:' - message += '\npip install -r askbot_requirements.txt\n' - message += '\nType ^C to quit.' + if short_message == False: + message += '\n\nTo install all the dependencies at once, type:' + message += '\npip install -r askbot_requirements.txt' + message += '\n\nType ^C to quit.' raise AskbotConfigError(message) def test_modules(): @@ -466,6 +467,19 @@ def test_settings_for_test_runner(): 'from MIDDLEWARE_CLASSES' ) print_errors(errors) + + +def test_avatar(): + """if "avatar" is in the installed apps, + checks that the module is actually installed""" + if 'avatar' in django_settings.INSTALLED_APPS: + try_import('Image', 'PIL', short_message = True) + try_import( + 'avatar', + '-e git+git://github.com/ericflo/django-avatar.git#egg=avatar', + short_message = True + ) + def run_startup_tests(): @@ -483,6 +497,7 @@ def run_startup_tests(): test_celery() #test_csrf_cookie_domain() test_staticfiles() + test_avatar() settings_tester = SettingsTester({ 'CACHE_MIDDLEWARE_ANONYMOUS_ONLY': { 'value': True, -- cgit v1.2.3-1-g7c22 From 64ab1ac2d8cfe57e524aca3341abc852b861e512 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Sat, 21 Apr 2012 10:05:24 -0400 Subject: updated changelog --- askbot/doc/source/changelog.rst | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst index 1055caf7..08aae0a2 100644 --- a/askbot/doc/source/changelog.rst +++ b/askbot/doc/source/changelog.rst @@ -1,6 +1,10 @@ Changes in Askbot ================= +0.7.41, 0.7.24 (April 21, 2012) +------------------------------- +* Bug fixes + 0.7.40 (March 29, 2012) ----------------------- * New data models!!! (`Tomasz ZieliƄski `_) -- cgit v1.2.3-1-g7c22