aboutsummaryrefslogtreecommitdiffstats
path: root/mediagoblin/edit/views.py
diff options
context:
space:
mode:
authorChristopher Allan Webber <cwebber@dustycloud.org>2011-08-28 22:05:54 -0500
committerChristopher Allan Webber <cwebber@dustycloud.org>2011-08-28 22:05:54 -0500
commit7dc3a66f924c734cbee68677e84f5b656eefe280 (patch)
treedf091eb3589ec2a7ab711acbe137af3c97a583f0 /mediagoblin/edit/views.py
parentad56a4826b987a0fa8f65849d3611f61cc1f50d6 (diff)
parent46df0297e029c075a2c28b0c31490c560c99158c (diff)
downloadmediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.tar.lz
mediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.tar.xz
mediagoblin-7dc3a66f924c734cbee68677e84f5b656eefe280.zip
Merge remote branch 'remotes/jwandborg/f403_ability_to_delete'
Conflicts: mediagoblin/edit/views.py mediagoblin/templates/mediagoblin/user_pages/media.html mediagoblin/user_pages/routing.py
Diffstat (limited to 'mediagoblin/edit/views.py')
-rw-r--r--mediagoblin/edit/views.py11
1 files changed, 6 insertions, 5 deletions
diff --git a/mediagoblin/edit/views.py b/mediagoblin/edit/views.py
index b0145a04..f766afdc 100644
--- a/mediagoblin/edit/views.py
+++ b/mediagoblin/edit/views.py
@@ -14,6 +14,7 @@
# You should have received a copy of the GNU Affero General Public License
# along with this program. If not, see <http://www.gnu.org/licenses/>.
+import uuid
from webob import exc
from string import split
@@ -64,8 +65,8 @@ def edit_media(request, media):
form.slug.errors.append(
_(u'An entry with that slug already exists for this user.'))
else:
- media['title'] = request.POST['title']
- media['description'] = request.POST.get('description')
+ media['title'] = unicode(request.POST['title'])
+ media['description'] = unicode(request.POST.get('description'))
media['tags'] = convert_to_tag_list_of_dicts(
request.POST.get('tags'))
@@ -80,7 +81,7 @@ def edit_media(request, media):
and 'y' == request.POST['attachment_delete']:
del media['attachment_files'][0]
- media['slug'] = request.POST['slug']
+ media['slug'] = unicode(request.POST['slug'])
media.save()
return redirect(request, "mediagoblin.user_pages.media_home",
@@ -171,8 +172,8 @@ def edit_profile(request):
bio=user.get('bio'))
if request.method == 'POST' and form.validate():
- user['url'] = request.POST['url']
- user['bio'] = request.POST['bio']
+ user['url'] = unicode(request.POST['url'])
+ user['bio'] = unicode(request.POST['bio'])
user['bio_html'] = cleaned_markdown_conversion(user['bio'])