Skip to content
Permalink
Browse files
add example to docstring
  • Loading branch information
ralsina committed Jan 17, 2015
1 parent a6c8af0 commit 1df4d0882eb528891519d4a8307b1c25e22dbd04
Showing with 8 additions and 1 deletion.
  1. +8 −1 nikola/post.py
@@ -362,7 +362,14 @@ def add_dependency_uptodate(self, dependency, is_callable=False, add='both', lan
includes the HTML resulting from compiling the fragment ('page' or
'both').
If ``lang`` is not specified, this dependency is added for all languages."""
If ``lang`` is not specified, this dependency is added for all languages.
Example:
post.add_dependency_uptodate(
utils.config_changed({1: some_data}, 'uniqueid'), False, 'page')
"""
if add == 'fragment' or add == 'both':
self._dependency_uptodate_fragment[lang].append((is_callable, dependency))
if add == 'page' or add == 'both':

0 comments on commit 1df4d08

Please sign in to comment.