﻿id	summary	reporter	owner	description	type	status	component	version	severity	resolution	keywords	cc	stage	has_patch	needs_docs	needs_tests	needs_better_patch	easy	ui_ux
3524	Models: Sub String for a character field	richard.freitag@…	Jacob	"I was wondering if in a Model you can substring 
For example


State = models.Charfield(maxlength=3)[[BR]]

Fileid = models.Charfield(maxlength=10)[[BR]]

Date = models.DateField[[BR]]


and the following definition[[BR]]


def save(self):[[BR]]

               d = self.Date[[BR]]

	       state = self.State[[BR]]

	       self.Fileid = dateformat.format(d, ""Y"")+self.state(1,1) <------- This is where I would substring I assume.[[BR]]

	       super(case_file, self).save() #Calls the real Save function[[BR]]


This doesn't appear to work, would you have any suggestions?[[BR]]


Regards[[BR]]
"		closed	Uncategorized	dev		invalid			Unreviewed	0	0	0	0	0	0
