0

I have an XML file in /my_project/public/xml/file.xml, that I want to read and parse it in one method in controller. The file can be easily accessed through a template, but I have no experience with accessing files in controller.

narengi
  • 1,345
  • 3
  • 17
  • 38

1 Answers1

0

the more simple I know : jest get the diname of base of the project filename = os.path.join(os.path.dirname(myproject.__file__), 'public', 'xml', 'file.xml')