[svn] * Adding JS fill in next QM number via ajax.

* Slight models cleanup- get rid of TroggleImageModel class, use mixin instead.
* Collect various troggle shared functions into utils.py
This commit is contained in:
substantialnoninfringinguser
2009-07-04 08:27:49 +01:00
parent c132477f80
commit dd76a1a0be
9 changed files with 154 additions and 112 deletions

View File

@@ -31,7 +31,10 @@ class SurvexBlock(models.Model):
ordering = ('date', 'survexpath')
def __unicode__(self):
return unicode(self.name)
if self.name:
return unicode(self.name)
else:
return 'no name'
def filecontents(self):
f = os.path.join(settings.SURVEX_DATA, self.begin_file)