Skip to content

Commit

Permalink
add example to docstring
Browse files Browse the repository at this point in the history
  • Loading branch information
ralsina committed Jan 17, 2015
1 parent a6c8af0 commit 1df4d08
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion nikola/post.py
Expand Up @@ -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':
Expand Down

0 comments on commit 1df4d08

Please sign in to comment.