Chapter 22. Implementing Multiple Websites
What You’ll Learn in This Hour
- framework
- How to implement the
sites
framework - How to limit access to content to one class
- How to assign content to multiple sites
- How to use the
Site
object to modify the behavior of a view function - How to use the
CurrentSiteManager
class to limit access to objects in a view function
The django.contrib.sites
framework is a simple framework that provides a basic method of implementing multiple websites in the same Django installation. Using the sites
framework, you can control which sites have access to content and also control the behavior of views.
This hour discusses implementing the sites
framework and using the CurrentSiteManager
class to control access to content.
Get Sams Teach Yourself Django in 24 Hours now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.