Skip to content

Commit

Permalink
Added MovieMacroConfig to specify default width and height
Browse files Browse the repository at this point in the history
  • Loading branch information
t2y committed Oct 31, 2014
1 parent 5ca2a61 commit b67f32f
Showing 1 changed file with 21 additions and 0 deletions.
21 changes: 21 additions & 0 deletions trunk/movie/model.py
@@ -0,0 +1,21 @@
# -*- coding: utf-8 -*-


class MovieMacroConfig(object):
"""Configuration model to handle MovieMacro settings."""

SECTION = 'moviemacro'
DEFAULT_WIDTH = '640px'
DEFAULT_HEIGHT = '360px'

def __init__(self, env, config):
self.env = env
self.config = config

@property
def width(self):
return self.config.get(self.SECTION, 'width', self.DEFAULT_WIDTH)

@property
def height(self):
return self.config.get(self.SECTION, 'height', self.DEFAULT_HEIGHT)

0 comments on commit b67f32f

Please sign in to comment.