April 2019
Beginner to intermediate
774 pages
24h 59m
English
In the first step, we have added website.multi.mixin. This mixin adds a basic utility to handle multiple websites in the model. This mixin adds the website_id field in the model. This field is used to determine which website a record is meant for.
In step 2, we have added the website_id field in the form view of the book, so the books will be filtered based on the website. In step 3, we have modified the domain used to find a list of books. request.website.website_domain() will return the domain that filters out the books that are not from the website.
Read now
Unlock full access