example = 'http://wolnelektury.pl/katalog/lektura/template/'
_re_wl_uri = re.compile('http://wolnelektury.pl/katalog/lektura/'
example = 'http://wolnelektury.pl/katalog/lektura/template/'
_re_wl_uri = re.compile('http://wolnelektury.pl/katalog/lektura/'
"""Contructs an URI from slug and language code.
>>> WLURI.from_slug_and_lang('a-slug', WLURI.DEFAULT_LANGUAGE).uri
"""Contructs an URI from slug and language code.
>>> WLURI.from_slug_and_lang('a-slug', WLURI.DEFAULT_LANGUAGE).uri
uri = 'http://wolnelektury.pl/katalog/lektura/%s/' % slug
if lang is not None and lang != cls.DEFAULT_LANGUAGE:
uri += lang + '/'
uri = 'http://wolnelektury.pl/katalog/lektura/%s/' % slug
if lang is not None and lang != cls.DEFAULT_LANGUAGE:
uri += lang + '/'
def by_slug_and_lang(self, slug, lang=None):
fname = WLURI.from_slug_and_lang(slug, lang).filename_stem() + '.xml'
def by_slug_and_lang(self, slug, lang=None):
fname = WLURI.from_slug_and_lang(slug, lang).filename_stem() + '.xml'