-
Notifications
You must be signed in to change notification settings - Fork 1
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Overhaul for efficiency, Py3k compatibility, less convoluted control …
…flow. * New feature: `instance.has_summary` set to True if an explicitly-defined summary exists, False otherwise. Templates can use this to inject a "read more" link for instance (the `read_more_link` plugin seems to be broken under Py3k). * Tested under Python 3.4; import unicode_literals for consistent behavior on both Py2 and Py3. * `instance._content` is modified directly instead of using the undocumented `instance._get_content` hook. * Control flow within `content_object_init` hook is streamlined. * Settings are looked up only once per article, which helps both efficiency and readability.
- Loading branch information
Showing
2 changed files
with
48 additions
and
30 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters