- Timestamp:
- 02/09/11 09:06:55 (13 years ago)
- Location:
- trunk/sara_cmt/sara_cmt
- Files:
-
- 3 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/sara_cmt/sara_cmt/cluster/models.py
r12336 r12457 131 131 host = models.ForeignKey('HardwareUnit', related_name='interfaces', 132 132 verbose_name='machine') 133 iftype 133 iftype = models.ForeignKey('InterfaceType', related_name='interfaces', 134 134 verbose_name='type') 135 135 label = models.CharField(max_length=255, help_text='Automagically \ -
trunk/sara_cmt/sara_cmt/cluster/templatetags/ramonb_extras.py
r12450 r12457 65 65 Variable assignment within template 66 66 67 Usage: {% assign newvar = <space seprated list of strings/vars %}67 Usage: {% assign newvar = <space seprated list of strings/vars> %} 68 68 i.e.: {% assign file_name = '/var/tmp/rack-' rack.label '.txt' %} 69 69 """ … … 97 97 if not (a[0] == a[-1] and a[0] in ('"', "'")): 98 98 try: 99 # RB: no quotes must mean its a nvariable99 # RB: no quotes must mean its a variable 100 100 # 101 101 a_var = template.Variable( a ) … … 159 159 160 160 else: 161 # RB: Not quoted: must be a nvariable: attempt to resolve to value161 # RB: Not quoted: must be a variable: attempt to resolve to value 162 162 try: 163 163 pathvar = template.Variable( str(self.path_str) ) 164 164 mypath_str = pathvar.resolve(context) 165 165 except template.VariableDoesNotExist: 166 #raise template.TemplateSyntaxError, '%r tag argument 1: not a nvariable %r' %( tag, path_str )166 #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str ) 167 167 pass 168 168 … … 236 236 network_str = str( self.network_name.strip("'").strip('"') ) 237 237 else: 238 # RB: Not quoted: must be a nvariable: attempt to resolve to value238 # RB: Not quoted: must be a variable: attempt to resolve to value 239 239 try: 240 240 networkvar = template.Variable( str(self.network_name) ) 241 241 network_str = networkvar.resolve(context) 242 242 except template.VariableDoesNotExist: 243 #raise template.TemplateSyntaxError, '%r tag argument 1: not a nvariable %r' %( tag, path_str )243 #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str ) 244 244 pass 245 245 … … 337 337 myquery_str = str( self.query.strip("'").strip('"') ) 338 338 else: 339 # RB: Not quoted: must be a nvariable: attempt to resolve to value339 # RB: Not quoted: must be a variable: attempt to resolve to value 340 340 try: 341 341 queryvar = template.Variable( str(self.query) ) 342 342 myquery_str = queryvar.resolve(context) 343 343 except template.VariableDoesNotExist: 344 #raise template.TemplateSyntaxError, '%r tag argument 1: not a nvariable %r' %( tag, path_str )344 #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str ) 345 345 pass 346 346 -
trunk/sara_cmt/sara_cmt/settings.py
r12408 r12457 140 140 ROOT_URLCONF = 'sara_cmt.urls' 141 141 142 # Templates for the CMT web-frontend. 142 143 TEMPLATE_DIRS = ( 143 144 # Put strings here, like "/home/html/django_templates" … … 146 147 # Don't forget to use absolute paths, not relative paths. 147 148 os.path.normpath(os.path.join(os.path.dirname(__file__), 'cluster/templates')), 148 #os.path.normpath(os.path.join(os.path.dirname(__file__), '../templates')),149 '/etc/sara_cmt/templates'150 149 ) 151 150 151 # Templates for the CMT command line interface. 152 # (thus, the templates for our configfiles, etc) 152 153 CMT_TEMPLATES_DIR = '/etc/sara_cmt/templates' 153 #CMT_TEMPLATES_DIR = os.path.normpath(os.path.join(os.path.dirname(__file__), \154 # '../templates'))155 #CMT_TEMPLATE_DIRS = (os.path.normpath(os.path.join(os.path.dirname(__file__),156 #'../templates')),)157 154 158 155 FIXTURE_DIRS = ( 159 156 # A fixture is a collection of files that contain serialized contents of 160 # the database. 157 # the database. (can be used for testing) 161 158 os.path.normpath(os.path.join(os.path.dirname(__file__), 'fixtures')), 162 159 )
Note: See TracChangeset
for help on using the changeset viewer.