Skip to content
This repository has been archived by the owner on Jan 25, 2019. It is now read-only.

Commit

Permalink
Add deprecation warning about {ext} vs {type}
Browse files Browse the repository at this point in the history
  • Loading branch information
mythmon committed Nov 10, 2011
1 parent c3f3d58 commit 4a48981
Showing 1 changed file with 6 additions and 1 deletion.
7 changes: 6 additions & 1 deletion wok/engine.py
Expand Up @@ -25,7 +25,7 @@ class Engine(object):
'output_dir': 'output',
'media_dir': 'media',
'site_title': 'Some random Wok site',
'url_pattern': '/{category}/{slug}{page}.{type}',
'url_pattern': '/{category}/{slug}{page}.{ext}',
'url_include_index': True,
}

Expand Down Expand Up @@ -126,6 +126,11 @@ def read_options(self):
'Smith"] instead of "John Doe, Jane Smith". In config '
'file.')

if '{type}' in self.options['url_pattern']:
logging.warn('Deprecation Warning: You should use {ext} instead '
'of {type} in the url pattern specified in the config '
'file.')

def sanity_check(self):
"""Basic sanity checks."""
# Make sure that this is (probabably) a wok source directory.
Expand Down

0 comments on commit 4a48981

Please sign in to comment.