Changeset 12457 for trunk


Ignore:
Timestamp:
02/09/11 09:06:55 (13 years ago)
Author:
sil
Message:
  • Made some corrections in settings.py, and added comments to clarify things.
  • Acted like an indenting- and language-purist
Location:
trunk/sara_cmt/sara_cmt
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/sara_cmt/sara_cmt/cluster/models.py

    r12336 r12457  
    131131    host      = models.ForeignKey('HardwareUnit', related_name='interfaces',
    132132                                  verbose_name='machine')
    133     iftype      = models.ForeignKey('InterfaceType', related_name='interfaces',
     133    iftype    = models.ForeignKey('InterfaceType', related_name='interfaces',
    134134                                  verbose_name='type')
    135135    label     = models.CharField(max_length=255, help_text='Automagically \
  • trunk/sara_cmt/sara_cmt/cluster/templatetags/ramonb_extras.py

    r12450 r12457  
    6565        Variable assignment within template
    6666
    67         Usage: {% assign newvar = <space seprated list of strings/vars %}
     67        Usage: {% assign newvar = <space seprated list of strings/vars> %}
    6868         i.e.: {% assign file_name = '/var/tmp/rack-' rack.label '.txt' %}
    6969    """
     
    9797            if not (a[0] == a[-1] and a[0] in ('"', "'")):
    9898                try:
    99                     # RB: no quotes must mean its an variable
     99                    # RB: no quotes must mean its a variable
    100100                    #
    101101                    a_var = template.Variable( a )
     
    159159
    160160        else:
    161             # RB: Not quoted: must be an variable: attempt to resolve to value
     161            # RB: Not quoted: must be a variable: attempt to resolve to value
    162162            try:
    163163                pathvar = template.Variable( str(self.path_str) )
    164164                mypath_str = pathvar.resolve(context)
    165165            except template.VariableDoesNotExist:
    166                 #raise template.TemplateSyntaxError, '%r tag argument 1: not an variable %r' %( tag, path_str )
     166                #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str )
    167167                pass
    168168
     
    236236            network_str = str( self.network_name.strip("'").strip('"') )
    237237        else:
    238             # RB: Not quoted: must be an variable: attempt to resolve to value
     238            # RB: Not quoted: must be a variable: attempt to resolve to value
    239239            try:
    240240                networkvar = template.Variable( str(self.network_name) )
    241241                network_str = networkvar.resolve(context)
    242242            except template.VariableDoesNotExist:
    243                 #raise template.TemplateSyntaxError, '%r tag argument 1: not an variable %r' %( tag, path_str )
     243                #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str )
    244244                pass
    245245
     
    337337            myquery_str = str( self.query.strip("'").strip('"') )
    338338        else:
    339             # RB: Not quoted: must be an variable: attempt to resolve to value
     339            # RB: Not quoted: must be a variable: attempt to resolve to value
    340340            try:
    341341                queryvar = template.Variable( str(self.query) )
    342342                myquery_str = queryvar.resolve(context)
    343343            except template.VariableDoesNotExist:
    344                 #raise template.TemplateSyntaxError, '%r tag argument 1: not an variable %r' %( tag, path_str )
     344                #raise template.TemplateSyntaxError, '%r tag argument 1: not a variable %r' %( tag, path_str )
    345345                pass
    346346
  • trunk/sara_cmt/sara_cmt/settings.py

    r12408 r12457  
    140140ROOT_URLCONF = 'sara_cmt.urls'
    141141
     142# Templates for the CMT web-frontend.
    142143TEMPLATE_DIRS = (
    143144    # Put strings here, like "/home/html/django_templates"
     
    146147    # Don't forget to use absolute paths, not relative paths.
    147148    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'
    150149)
    151150
     151# Templates for the CMT command line interface.
     152# (thus, the templates for our configfiles, etc)
    152153CMT_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')),)
    157154
    158155FIXTURE_DIRS = (
    159156    # A fixture is a collection of files that contain serialized contents of
    160     # the database.
     157    # the database. (can be used for testing)
    161158    os.path.normpath(os.path.join(os.path.dirname(__file__), 'fixtures')),
    162159)
Note: See TracChangeset for help on using the changeset viewer.