Skip to content

Instantly share code, notes, and snippets.

@piotr-dobrogost
Created November 6, 2015 14:42
Show Gist options
  • Save piotr-dobrogost/968f99c96d9aa0d1b2e4 to your computer and use it in GitHub Desktop.
Save piotr-dobrogost/968f99c96d9aa0d1b2e4 to your computer and use it in GitHub Desktop.
Interaction between overrides and translations in Pyramid – difference with and without config.begin()
from pyramid.config import Configurator
config = Configurator()
config.begin()
config.override_asset('framework', 'app:framework-overrides/')
config.commit()
config.add_translation_dirs('framework:locale')
With config.begin() (line 4 in app/__init__.py):
pyramid.exceptions.ConfigurationError: "/home/piotr/projects/pyramid/repro2/app/framework-overrides/locale" is not a directory
Without config.begin() (line 4 in app/__init__.py):
pyramid.exceptions.ConfigurationError: "/home/piotr/projects/pyramid/repro2/app/framework/locale" is not a directory
app
├── framework
│ ├── __init__.py
├── framework-overrides
├── __init__.py
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment