diff options
-rw-r--r-- | askbot/__init__.py | 2 | ||||
-rw-r--r-- | askbot/doc/source/changelog.rst | 4 | ||||
-rw-r--r-- | askbot/middleware/spaceless.py | 1 | ||||
-rw-r--r-- | askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py | 7 | ||||
-rw-r--r-- | askbot/skins/default/templates/badges.html | 2 | ||||
-rw-r--r-- | askbot/startup_procedures.py | 23 |
6 files changed, 32 insertions, 7 deletions
diff --git a/askbot/__init__.py b/askbot/__init__.py index a83d6f54..12517182 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 diff --git a/askbot/doc/source/changelog.rst b/askbot/doc/source/changelog.rst index eb1cd591..53a0d5f8 100644 --- a/askbot/doc/source/changelog.rst +++ b/askbot/doc/source/changelog.rst @@ -8,6 +8,10 @@ Future version * Enabling/disabling the badges system (Evgeny) * Created a basic post moderation feature (Evgeny) +0.7.41, 0.7.42 (April 21, 2012) +------------------------------- +* Bug fixes + 0.7.40 (March 29, 2012) ----------------------- * New data models!!! (`Tomasz ZieliĆski <http://pyconsultant.eu>`_) 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 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() diff --git a/askbot/skins/default/templates/badges.html b/askbot/skins/default/templates/badges.html index 62627b05..668de4f8 100644 --- a/askbot/skins/default/templates/badges.html +++ b/askbot/skins/default/templates/badges.html @@ -7,7 +7,7 @@ {% trans %}Community gives you awards for your questions, answers and votes.{% endtrans %}<br/> {% trans %}Below is the list of available badges and number of times each type of badge has been awarded. Have ideas about fun -badges? Please, give us your <a href='%(feedback_faq_url)s'>feedback</a> +badges? Please, give us your <a href='{{feedback_faq_url}}'>feedback</a> {% endtrans %} </p> <div id="medalList"> 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, |