I am using Mezzanine + cartridge and want to customize it.
I can overwrite the templates by placing them in our project template folder.
But I have no idea how to overwrite views and models.Because I have to edit some extra functionality to my project.
For example .. saving cookies at sign up time, I have done this by editing root files. But can someone tell me how to overwrite these particular functions in my project.
Thanks
There are two main ways for you to handle modifications to 3rd party apps.
If some parts of what you want is significantly different from what that 3rd party app provides, you might consider forking the project, making changes and pushing the changes into its git repository and then re-installing your forked version via
If you think that this might be too troublesome, another way would be to declare a specific url/view function (that was defined in the 3rd party app) in your own project’s urls.py.
In your case, what you are trying to remap is
mezzanine.accounts.urls. reference – https://github.com/stephenmcd/mezzanine/blob/master/mezzanine/accounts/urls.pySo you can basically declare the url you want to override in your own project’s urls.py and it will take precedence over that url that is declared by mezzanine and you can point it to your custom view function.
If you come to a point that you actually need to modify one of mezzanine’s
models.py, I would suggest you go by the forking route mentioned above.