1. Any objections to moving description_from_content() to the MetaData model? 2. Adding a management command that runs description_from_content() for all models using MetaData so description_from_content is optionally tied to save...
But description_from_content relies on drawing the content from somewhere, falling back to the title, which is defined in Slugged.
So perhaps title belongs on Meta, which makes sense to me, and Slugged then subclasses Meta, then displayable need only subclass Slugged rather than both.
How does this sound?
Management command sounds good too.
On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote: > 1. Any objections to moving description_from_content() to the MetaData > model? > 2. Adding a management command that runs description_from_content() for > all models using MetaData so description_from_content is optionally tied to > save...
Makes sense.... can't have Meta without Slugged anyway... I mean you could... but I can't think of any reason why...
On another note... if i remember correctly (have to look at it again)... currently every time the object is saved ... description is gleaned from existing content... could this be toggled by a boolean in settings? I could see this causing issues especially when using custom descriptions...
On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
> Makes sense since description is part of Meta.
> But description_from_content relies on drawing the content from somewhere, > falling back to the title, which is defined in Slugged.
> So perhaps title belongs on Meta, which makes sense to me, and Slugged > then subclasses Meta, then displayable need only subclass Slugged rather > than both.
> How does this sound?
> Management command sounds good too.
> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>> 1. Any objections to moving description_from_content() to the MetaData >> model? >> 2. Adding a management command that runs description_from_content() for >> all models using MetaData so description_from_content is optionally tied to >> save...
No you're right it happens every time. I think it was originally only when the description didn't have a value. It's a fine line, sometimes you'll want it to automatically update, and when you add your own custom description, you obviously won't. I wonder if there's a way of detecting a custom description without needing a bool to toggle.
On Thu, Mar 8, 2012 at 9:16 AM, step <ste...@gmail.com> wrote: > Never mind... it's only when there's no publish_date
> On Wednesday, March 7, 2012 5:14:36 PM UTC-5, step wrote:
>> Makes sense.... can't have Meta without Slugged anyway... I mean you >> could... but I can't think of any reason why...
>> On another note... if i remember correctly (have to look at it again)... >> currently every time the object is saved ... description is gleaned from >> existing content... could this be toggled by a boolean in settings? I >> could see this causing issues especially when using custom descriptions...
>> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>>> Makes sense since description is part of Meta.
>>> But description_from_content relies on drawing the content from >>> somewhere, falling back to the title, which is defined in Slugged.
>>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >>> then subclasses Meta, then displayable need only subclass Slugged rather >>> than both.
>>> How does this sound?
>>> Management command sounds good too.
>>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>>> 1. Any objections to moving description_from_content() to the MetaData >>>> model? >>>> 2. Adding a management command that runs description_from_content(**) >>>> for all models using MetaData so description_from_content is optionally >>>> tied to save...
Didn't quite work out the way I proposed. Slugged can't subclass MetaData since Keyword subclasses Slugged, and MetaData contains Keywords - it might be doable but it'd be pretty messy I think.
Anyway the above commit achieves the desired effect - description_from_content is now on MetaData along with a few other small tweaks.
Didn't look at the management command or controlling when the description gets set.
On Thu, Mar 8, 2012 at 9:14 AM, step <ste...@gmail.com> wrote: > Makes sense.... can't have Meta without Slugged anyway... I mean you > could... but I can't think of any reason why...
> On another note... if i remember correctly (have to look at it again)... > currently every time the object is saved ... description is gleaned from > existing content... could this be toggled by a boolean in settings? I > could see this causing issues especially when using custom descriptions...
> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>> Makes sense since description is part of Meta.
>> But description_from_content relies on drawing the content from >> somewhere, falling back to the title, which is defined in Slugged.
>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >> then subclasses Meta, then displayable need only subclass Slugged rather >> than both.
>> How does this sound?
>> Management command sounds good too.
>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>> 1. Any objections to moving description_from_content() to the MetaData >>> model? >>> 2. Adding a management command that runs description_from_content(**) >>> for all models using MetaData so description_from_content is optionally >>> tied to save...
Hmm, I'm not sure how you could see if there's been custom input... what would happen if they wanted to use automatic descriptions again... maybe it's one way or the other... There could a use_auto_description checkbox in Metadata, default to True... might be ugly, but follows the UI for in_nav in Page...
> Didn't quite work out the way I proposed. Slugged can't subclass MetaData > since Keyword subclasses Slugged, and MetaData contains Keywords - it might > be doable but it'd be pretty messy I think.
> Anyway the above commit achieves the desired effect - > description_from_content is now on MetaData along with a few other small > tweaks.
> Didn't look at the management command or controlling when the description > gets set.
> On Thu, Mar 8, 2012 at 9:14 AM, step <ste...@gmail.com> wrote:
>> Makes sense.... can't have Meta without Slugged anyway... I mean you >> could... but I can't think of any reason why...
>> On another note... if i remember correctly (have to look at it again)... >> currently every time the object is saved ... description is gleaned from >> existing content... could this be toggled by a boolean in settings? I >> could see this causing issues especially when using custom descriptions...
>> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>>> Makes sense since description is part of Meta.
>>> But description_from_content relies on drawing the content from >>> somewhere, falling back to the title, which is defined in Slugged.
>>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >>> then subclasses Meta, then displayable need only subclass Slugged rather >>> than both.
>>> How does this sound?
>>> Management command sounds good too.
>>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>>> 1. Any objections to moving description_from_content() to the MetaData >>>> model? >>>> 2. Adding a management command that runs description_from_content(**) >>>> for all models using MetaData so description_from_content is optionally >>>> tied to save...
On Thu, Mar 15, 2012 at 1:57 AM, step <ste...@gmail.com> wrote: > Hmm, I'm not sure how you could see if there's been custom input... what > would happen if they wanted to use automatic descriptions again... maybe > it's one way or the other... There could a use_auto_description checkbox in > Metadata, default to True... might be ugly, but follows the UI for in_nav > in Page...
> On Friday, March 9, 2012 10:23:35 AM UTC-5, Stephen McDonald wrote:
>> Didn't quite work out the way I proposed. Slugged can't subclass MetaData >> since Keyword subclasses Slugged, and MetaData contains Keywords - it might >> be doable but it'd be pretty messy I think.
>> Anyway the above commit achieves the desired effect - >> description_from_content is now on MetaData along with a few other small >> tweaks.
>> Didn't look at the management command or controlling when the description >> gets set.
>> On Thu, Mar 8, 2012 at 9:14 AM, step <ste...@gmail.com> wrote:
>>> Makes sense.... can't have Meta without Slugged anyway... I mean you >>> could... but I can't think of any reason why...
>>> On another note... if i remember correctly (have to look at it >>> again)... currently every time the object is saved ... description is >>> gleaned from existing content... could this be toggled by a boolean in >>> settings? I could see this causing issues especially when using custom >>> descriptions...
>>> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>>>> Makes sense since description is part of Meta.
>>>> But description_from_content relies on drawing the content from >>>> somewhere, falling back to the title, which is defined in Slugged.
>>>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >>>> then subclasses Meta, then displayable need only subclass Slugged rather >>>> than both.
>>>> How does this sound?
>>>> Management command sounds good too.
>>>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>>>> 1. Any objections to moving description_from_content() to the MetaData >>>>> model? >>>>> 2. Adding a management command that runs description_from_content(****) >>>>> for all models using MetaData so description_from_content is optionally >>>>> tied to save...
I think it's worth noting here that search results are displayed using a truncated description so if the description was not set to auto-update you could end up with results with stale descriptions. I know it used to be the case that descriptions did not auto update and this was an issue I ran into then.
On Wed, Mar 14, 2012 at 3:11 PM, Stephen McDonald <st...@jupo.org> wrote: > Yeah I think the checkbox is actually right, explicit vs implicit etc.
> On Thu, Mar 15, 2012 at 1:57 AM, step <ste...@gmail.com> wrote:
>> Hmm, I'm not sure how you could see if there's been custom input... >> what would happen if they wanted to use automatic descriptions again... >> maybe it's one way or the other... There could a use_auto_description >> checkbox in Metadata, default to True... might be ugly, but follows the UI >> for in_nav in Page...
>> On Friday, March 9, 2012 10:23:35 AM UTC-5, Stephen McDonald wrote:
>>> Didn't quite work out the way I proposed. Slugged can't subclass >>> MetaData since Keyword subclasses Slugged, and MetaData contains Keywords - >>> it might be doable but it'd be pretty messy I think.
>>> Anyway the above commit achieves the desired effect - >>> description_from_content is now on MetaData along with a few other small >>> tweaks.
>>> Didn't look at the management command or controlling when the >>> description gets set.
>>> On Thu, Mar 8, 2012 at 9:14 AM, step <ste...@gmail.com> wrote:
>>>> Makes sense.... can't have Meta without Slugged anyway... I mean you >>>> could... but I can't think of any reason why...
>>>> On another note... if i remember correctly (have to look at it >>>> again)... currently every time the object is saved ... description is >>>> gleaned from existing content... could this be toggled by a boolean in >>>> settings? I could see this causing issues especially when using custom >>>> descriptions...
>>>> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>>>>> Makes sense since description is part of Meta.
>>>>> But description_from_content relies on drawing the content from >>>>> somewhere, falling back to the title, which is defined in Slugged.
>>>>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >>>>> then subclasses Meta, then displayable need only subclass Slugged rather >>>>> than both.
>>>>> How does this sound?
>>>>> Management command sounds good too.
>>>>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>>>>> 1. Any objections to moving description_from_content() to the >>>>>> MetaData model? >>>>>> 2. Adding a management command that runs description_from_content(*** >>>>>> *) for all models using MetaData so description_from_content >>>>>> is optionally tied to save...
On Thu, Mar 15, 2012 at 9:11 AM, Stephen McDonald <st...@jupo.org> wrote: > Yeah I think the checkbox is actually right, explicit vs implicit etc.
> On Thu, Mar 15, 2012 at 1:57 AM, step <ste...@gmail.com> wrote:
>> Hmm, I'm not sure how you could see if there's been custom input... >> what would happen if they wanted to use automatic descriptions again... >> maybe it's one way or the other... There could a use_auto_description >> checkbox in Metadata, default to True... might be ugly, but follows the UI >> for in_nav in Page...
>> On Friday, March 9, 2012 10:23:35 AM UTC-5, Stephen McDonald wrote:
>>> Didn't quite work out the way I proposed. Slugged can't subclass >>> MetaData since Keyword subclasses Slugged, and MetaData contains Keywords - >>> it might be doable but it'd be pretty messy I think.
>>> Anyway the above commit achieves the desired effect - >>> description_from_content is now on MetaData along with a few other small >>> tweaks.
>>> Didn't look at the management command or controlling when the >>> description gets set.
>>> On Thu, Mar 8, 2012 at 9:14 AM, step <ste...@gmail.com> wrote:
>>>> Makes sense.... can't have Meta without Slugged anyway... I mean you >>>> could... but I can't think of any reason why...
>>>> On another note... if i remember correctly (have to look at it >>>> again)... currently every time the object is saved ... description is >>>> gleaned from existing content... could this be toggled by a boolean in >>>> settings? I could see this causing issues especially when using custom >>>> descriptions...
>>>> On Wednesday, March 7, 2012 2:50:19 PM UTC-5, Stephen McDonald wrote:
>>>>> Makes sense since description is part of Meta.
>>>>> But description_from_content relies on drawing the content from >>>>> somewhere, falling back to the title, which is defined in Slugged.
>>>>> So perhaps title belongs on Meta, which makes sense to me, and Slugged >>>>> then subclasses Meta, then displayable need only subclass Slugged rather >>>>> than both.
>>>>> How does this sound?
>>>>> Management command sounds good too.
>>>>> On Thu, Mar 8, 2012 at 1:30 AM, step <ste...@gmail.com> wrote:
>>>>>> 1. Any objections to moving description_from_content() to the >>>>>> MetaData model? >>>>>> 2. Adding a management command that runs description_from_content(*** >>>>>> *) for all models using MetaData so description_from_content >>>>>> is optionally tied to save...