Addons
Juntagrico is a django app and can be extended with additional django apps. This page lists the various ways in which such addons can integrate with juntagrico.
For a list of existing addons See Advanced Setup.
Override Templates
Templates can be overridden by the addon in the same way the project can override templates.
Addons must be added above juntagrico in the INSTALLED_APPS.
See Templates Reference.
Extend Signup
Add a page to the signup process
Add a url and view for your new signup page.
Subclass the signup manager class and instruct the user to set it in the SIGNUP_MANAGER setting.
In your new signup view, when the form is submitted successfully, save the data in your signup manager or at least save a flag there, that the step was completed. Note that the session must be JSON serializable.
Override the
get_next_pagemethod of your signup manager and define the criteria, when the new page should be loaded. E.g., when the depot has been selected, but your new entity hasn’t. Return the url name of your new page in that case.
Modify the summary page
Override an adjacent block in the summary page template to add your new entity.
Create an edit link in your summary section, that leads back to the new page of the signup process and allows modifying the selection.
Save and notify
Override the
applymethod or one of the specificapply_...methods of your custom signup manager. E.g. if you need the subscription to be saved before your new entity can be saved, overrideapply_subscriptions, call the super method and then save your new entity.Send emails notifications if needed. Either in the same place or overriding the
send_emailsmethod.