Tiny typo in the first example there:

EXTRA_MODEL_FIELDS = (
    # Four-item sequence for one field injected.
    (
        # Dotted path to field.
        "mezzanine.blog.models.BlogPost.image",
        # Dotted path to field class.
        "somelib.fields.ImageField",
        # Positional args for field class.
        ("Image",),
        # Keyword args for field class.
        {"blank": True, *"upload_to:* "blog"},
    ),
)


Needs to be...

"upload_to":

 

> Cheers Ken, much appreciated!
>
> Rich
>
> On Wednesday, October 7, 2015 at 3:39:00 PM UTC+1, Kenneth Bolton wrote:
>>
>> Hi Rich,
>>
>> Your instincts regarding future-proofing are good. Take a look at the Model 
>> Customization 
>> <https://mezzanine.readthedocs.org/en/latest/model-customization.html> 
>> section 
>> of the docs.
>>
>> - ken
>>
>> On Wed, Oct 7, 2015 at 10:33 AM, Richard Jackson <[email protected]> 
>> wrote:
>>
>>> Hi there,
>>>
>>> I was interested in making an addition to my own site's BlogPost class 
>>> in mezzanine.blog.models.py (such as adding a new field called "foo"), 
>>> and was wondering about the best way to do this. 
>>>
>>> I'm assuming that editing the models.py file directly isn't a good idea 
>>> since this won't be future-proof for further Mezzanine updates/versions. Is 
>>> there a way of essentially importing the BlogPost class, and then 'adding' 
>>> to it?
>>>
>>> Thanks!
>>>
>>> Rich
>>>
>>> -- 
>>> You received this message because you are subscribed to the Google 
>>> Groups "Mezzanine Users" group.
>>> To unsubscribe from this group and stop receiving emails from it, send 
>>> an email to [email protected].
>>> For more options, visit https://groups.google.com/d/optout.
>>>
>>
>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to