I would like to remove multiplicative items in several fields of the
model.
I do not know how to save changes:

 for Lists in [a.SynGREn, a.SynGREnn]:
.......
...... make changes in field by editing Lists, i.e. cropping part of
text: changed_text=crop(Lists, words)
.......Lists=changed_text
....... a.save()

HOW to save these changes to model back?
#  a.save() does save changes  for model field a.SynGREn ,
a.SynGREnn


#Suppose threre is a model GRE, with Char fields        SynGREn,
SynGREnn

            for Lists in [a.SynGREn, a.SynGREnn]:
                strc=''
                List=Lists.split(',')
                for item in List:
                    if (len(item)!=0):
                        searchs='\s+'+item+'\s+'
                        if ( re.search(searchs, strc)==None ):
                            strc=strc+', '+item+' '
                Lists=strc
                a.save();
#saves changes only for variable Lists, not for model field a.SynGREn
or a.SynGREnn

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To post to this group, send email to django-users@googlegroups.com.
To unsubscribe from this group, send email to 
django-users+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/django-users?hl=en.

Reply via email to