On Sunday, January 3, 2016 at 2:40:03 PM UTC-8, Stephen McDonald wrote:
>
>
>
> On Mon, Jan 4, 2016 at 4:01 AM, Adam Simon <[email protected]
> <javascript:>> wrote:
>
>>
>> Hi all,
>>
>> First, thank you so much Stephen; mezzanine is truly awesome! For one:
>> the django integration is way better than rival packages.
>>
>
> And to the core team and all the contributors - it's the result of effort
> from a lot of people :-)
>
>
>>
>> After reading various online materials, i came up with this general
>> procedure to customize and wanted to get comments on this way of doing
>> overrides:
>>
>> My use case is to make changes in views; for example, to change the login
>> message to "congratulations, you have signed on" and add last sign on time.
>>
>> 1. collect templates
>> 2. copy app, eg accounts, from github into my project
>>
>> question:
>>
>> should I rename the accounts package to something project specific?
>>
>> 4. make changes
>> 5. add to installed apps, if name change
>> 6 add to urls.py
>>
>> ...
>>
>> 7. happiness
>>
>> this may be a form of "forking."
>>
>> Does this seem sound?
>>
>
> People will tell you not to, but speaking personally, I've done this many
> times with a lot of open source libraries and it works fine. Sometimes the
> knobs you want to tweak just aren't there, and if maintainers added every
> knob requested, they'd end up with something unmaintainable.
>
> But if you just want to override some views, you can create a new app
> (named accounts_extensions or something) that contains your own views, and
> point existing names of urlpatterns in your project's urls.py at them.
> There are also approaches to extending models in different ways, each with
> their own pros and cons - those are better covered in the Mezzanine and
> Django documentation.
>
> In the end you should experiment with different approaches and see what
> works best for you.
>
>
Of course, I truly appreciate everyone's efforts, including yours!
In that spirit, I would like a bit of deliberation for everyone googling
overriding mezzanine other than templates ...
Here is one minimal question:
What is the "best" way to override mezzanine/accounts/view.py - line 29 :
info(request, _("Successfully logged in")) in order to change the message?
Many thanks!
--
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.