Permalink
Browse files

JS and CSSSource require a .src attr.

  • Loading branch information...
ralphbean committed May 24, 2012
1 parent 66e93b6 commit ca02d9713caeb773179b4163eedc07f8fe6775d3
Showing with 10 additions and 0 deletions.
  1. +10 −0 tw2/core/resources.py
@@ -228,6 +228,11 @@ class JSSource(Resource):
def __repr__(self):
return "%s('%s')" % (self.__class__.__name__, self.src)
def prepare(self):
super(JSSource, self).prepare()
if not self.src:
raise ValueError("%r must be provided a 'src' attr" % self)
class CSSSource(Resource):
"""
@@ -240,6 +245,11 @@ class CSSSource(Resource):
def __repr__(self):
return "%s('%s')" % (self.__class__.__name__, self.src)
def prepare(self):
super(CSSSource, self).prepare()
if not self.src:
raise ValueError("%r must be provided a 'src' attr" % self)
class _JSFuncCall(JSSource):
"""

0 comments on commit ca02d97

Please sign in to comment.