summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-04-23 09:46:18 -0600
committerAdolfo Fitoria <adolfo.fitoria@gmail.com>2012-04-23 09:46:18 -0600
commitd0e4771699e5f87f275c4493c2f6f1241845dcd9 (patch)
tree6cf03de240baadfc6537880e320c658e28acbc7f
parent8f585b90c37299dbb65e9bf8c11615f90845fd76 (diff)
parent64ab1ac2d8cfe57e524aca3341abc852b861e512 (diff)
downloadaskbot-d0e4771699e5f87f275c4493c2f6f1241845dcd9.tar.gz
askbot-d0e4771699e5f87f275c4493c2f6f1241845dcd9.tar.bz2
askbot-d0e4771699e5f87f275c4493c2f6f1241845dcd9.zip
Merge branch 'master' of github.com:ASKBOT/askbot-devel
Conflicts: askbot/startup_procedures.py
-rw-r--r--askbot/__init__.py2
-rw-r--r--askbot/doc/source/changelog.rst4
-rw-r--r--askbot/middleware/spaceless.py1
-rw-r--r--askbot/migrations/0032_auto__del_field_badgedata_multiple__del_field_badgedata_description__d.py21
-rw-r--r--askbot/startup_procedures.py41
5 files changed, 38 insertions, 31 deletions
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
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 <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..70ef2f8d 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
@@ -5,7 +5,7 @@ from south.v2 import SchemaMigration
from django.db import models
class Migration(SchemaMigration):
-
+
def forwards(self, orm):
# Removing unique constraint on 'BadgeData', fields ['type', 'name']
@@ -27,12 +27,17 @@ 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()
+
+
-
-
def backwards(self, orm):
-
+
# Adding field 'BadgeData.multiple'
db.add_column('askbot_badgedata', 'multiple', self.gf('django.db.models.fields.BooleanField')(default=False, blank=True), keep_default=False)
@@ -50,8 +55,8 @@ class Migration(SchemaMigration):
# Removing unique constraint on 'BadgeData', fields ['slug']
db.delete_unique('askbot_badgedata', ['slug'])
-
-
+
+
models = {
'askbot.activity': {
'Meta': {'object_name': 'Activity', 'db_table': "u'activity'"},
@@ -330,5 +335,5 @@ class Migration(SchemaMigration):
'name': ('django.db.models.fields.CharField', [], {'max_length': '100'})
}
}
-
+
complete_apps = ['askbot']
diff --git a/askbot/startup_procedures.py b/askbot/startup_procedures.py
index 82eae060..618f1ed7 100644
--- a/askbot/startup_procedures.py
+++ b/askbot/startup_procedures.py
@@ -161,7 +161,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:
@@ -169,9 +169,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():
@@ -468,25 +469,17 @@ def test_settings_for_test_runner():
)
print_errors(errors)
-def test_mysql_south_bug():
- conflicting_mysql = []
- conn = connection.connection
- if hasattr(conn, '_server_version') or\
- 'mysql' in connection.settings_dict['ENGINE']:
- #checks for conflicting mysql version according to http://south.aeracode.org/ticket/747
- mysql_version = getattr(conn, '_server_version', (5,0))
- south_version = south.__version__
- if mysql_version >= (5,0) and south_version <= '0.7.4':
- #just warns because some versions works and it's not possible
- #to detect the full version number from thee connection object
- message = 'Warning: There is a bug in south with mysql database engine,'
- message += '\nmigrations might not work, to fix it please install south from their mercurial repository'
- message += '\nmore information here: http://askbot.org/en/question/6902/error-while-setting-up-askbot?answer=6964#answer-container-6964'
- askbot_warning(message)
- else:
- #not mysql
- pass
+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():
"""function that runs
@@ -503,7 +496,11 @@ def run_startup_tests():
test_celery()
#test_csrf_cookie_domain()
test_staticfiles()
+<<<<<<< HEAD
test_mysql_south_bug()
+=======
+ test_avatar()
+>>>>>>> 64ab1ac2d8cfe57e524aca3341abc852b861e512
settings_tester = SettingsTester({
'CACHE_MIDDLEWARE_ANONYMOUS_ONLY': {
'value': True,