mediagoblin-devel
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [GMG-Devel] Patches for blog media_type


From: Laura Arjona Reina
Subject: Re: [GMG-Devel] Patches for blog media_type
Date: Mon, 24 Aug 2015 09:37:17 +0200
User-agent: K-9 Mail for Android

On 24 de agosto de 2015 09:07:21 GMT+02:00, ayleph <address@hidden> wrote:
>Hi gang,
>
>I've got a number of small patches for the blog media_type that I'm
>hoping to roll into a branch for review soon. I'd like some feedback on
>my solution to one of the issues, explained below. There's also a Trac
>ticket for this issue, but there's not much content on the ticket yet.
>
>https://issues.mediagoblin.org/ticket/5316
>
>The most annoying blog issue at the moment is that a user is allowed to
>create a blog or blogpost with no title, which generates an empty slug
>and causes a server crash when someone tries to access that blog or
>blogpost. I've made a small change to fix this on my instance.
>
>mediagoblin/media_types/blog/views.py:
>
>- blog.title = six.text_type(form.title.data)
>+ blog.title = (six.text_type(form.title.data) or u'untitled blog')
>
>- blogpost.title = six.text_type(form.title.data)
>+ blogpost.title = (six.text_type(form.title.data) or u'untitled blog
>post')
>
>I have two questions about this approach.
>
>1. Does it seem acceptable to default to a text string like this, or
>would we rather just have some UUID-gen string? Note that if I make
>multiple blogs or blogposts with the same title, the successive slugs
>do
>get a generated bit tacked on to the end, so there's no issue with
>defaulting to the same string for every blog or blogpost.
>2. If the above approach sounds good, should I make the default strings
>translatable, or just leave them in English?
>

Translatable, please.
Thanks

>Thanks,
>
>-- 
>ayleph
>_______________________________________________
>devel mailing list
>address@hidden
>http://lists.mediagoblin.org/listinfo/devel

--
Laura Arjona
https://wiki.debian.org/LauraArjona


reply via email to

[Prev in Thread] Current Thread [Next in Thread]