I have a Django model where there is FileField to upload files. I want to upload the files in the templates directory under the XML folder but before saving the files there I want the file open and add the following line of code in each and every file before <TEI> tags and save in the templates directory under the XML folder. So can anyone help me to read , append and override save method in Django model?
<?xml-stylesheet type="text/xsl" href="teibp.xsl"?>