models: move the import of flask in the method which needs it
models: move the import of flask in the method which needs it

"import flask" at the beginning of the file requires us to have flask
installed on all machines which use models.py
now it's only required if the specific method is called

nonas/debian-qa,devoxel/debsources,matthieucan/debsources,clemux/debsources,matthieucan/debsources,Debian/debsources,nonas/debian-qa,sophiejjj/debsources,zacchiro/debsources,zacchiro/debsources,matthieucan/debsources,vivekanand1101/debsources,nonas/debian-qa,clemux/debsources,vivekanand1101/debsources,zacchiro/debsources,devoxel/debsources,vivekanand1101/debsources,zacchiro/debsources,oorestisime/debsources,devoxel/debsources,zacchiro/debsources,oorestisime/debsources,Debian/debsources,clemux/debsources,oorestisime/debsources,devoxel/debsources,clemux/debsources,matthieucan/debsources,oorestisime/debsources,Debian/debsources,vivekanand1101/debsources,sophiejjj/debsources,clemux/debsources,Debian/debsources,matthieucan/debsources,vivekanand1101/debsources,Debian/debsources,sophiejjj/debsources,nonas/debian-qa,sophiejjj/debsources,oorestisime/debsources,sophiejjj/debsources,devoxel/debsources