From 2021e406613437ef91cfca7e7e22b4d42d81c5f0 Mon Sep 17 00:00:00 2001 From: Evgeny Fadeev Date: Mon, 1 Nov 2010 19:19:40 -0400 Subject: fixed two bugs on upload of logo and advanced version to 0.6.20 --- askbot/__init__.py | 2 +- askbot/const/__init__.py | 2 +- askbot/deps/livesettings/views.py | 4 ++-- askbot/skins/utils.py | 1 + 4 files changed, 5 insertions(+), 4 deletions(-) diff --git a/askbot/__init__.py b/askbot/__init__.py index b29f4ff7..4628162b 100644 --- a/askbot/__init__.py +++ b/askbot/__init__.py @@ -22,7 +22,7 @@ def get_version(): """returns version of the askbot app this version is meaningful for pypi only """ - return '0.6.18' + return '0.6.20' #todo: maybe send_mail functions belong to models #or the future API diff --git a/askbot/const/__init__.py b/askbot/const/__init__.py index 7770f858..592b421e 100644 --- a/askbot/const/__init__.py +++ b/askbot/const/__init__.py @@ -80,7 +80,7 @@ UNANSWERED_QUESTION_MEANING_CHOICES = ( #however it will be hard to expect that people will type #correct regexes - plus this must be an anchored regex #to do full string match -TAG_REGEX = r'^[\w\+\.\-]+$' +TAG_REGEX = r'^[\w\+\.\-#]+$' TAG_SPLIT_REGEX = r'[ ,]+' TYPE_ACTIVITY_ASK_QUESTION=1 diff --git a/askbot/deps/livesettings/views.py b/askbot/deps/livesettings/views.py index c6964743..0c1bcfd8 100644 --- a/askbot/deps/livesettings/views.py +++ b/askbot/deps/livesettings/views.py @@ -27,17 +27,17 @@ def group_settings(request, group, template='livesettings/group_settings.html'): #editor = forms.customized_editor(settings) if request.method == 'POST': + # Populate the form with user-submitted data data = request.POST.copy() form = forms.SettingsEditor(data, request.FILES, settings=settings) if form.is_valid(): - form.full_clean() for name, value in form.cleaned_data.items(): group, key = name.split('__') cfg = mgr.get_config(group, key) if isinstance(cfg, ImageValue): - if request.FILES: + if request.FILES and name in request.FILES: value = request.FILES[name] else: continue diff --git a/askbot/skins/utils.py b/askbot/skins/utils.py index c07f2638..67678cd4 100644 --- a/askbot/skins/utils.py +++ b/askbot/skins/utils.py @@ -37,6 +37,7 @@ def get_media_url(url): if file is not found - returns None and logs an error message """ + url = unicode(url) while url[0] == '/': url = url[1:] #todo: handles case of multiple skin directories -- cgit v1.2.3-1-g7c22