Working with Visual FoxPro 9.0 DBF Files in Django ORM

Hi everyone,

I’m currently working on a project where I need to interact with .dbf files from Visual FoxPro 9.0 using Django. Given that there isn’t a native Django backend for Visual FoxPro, I’ve been attempting to manage these files using a custom model manager. However, I’ve encountered several issues that I hope some of you might have experience with or can offer advice on:

  1. Deleting Records: I’m having trouble deleting records from the .dbf files. The deletion process doesn’t seem to work as expected, and I’m unsure whether it’s an issue with how the SQL commands are being executed or something inherent to the file format.
  2. Problems with Lookups in Filtering: When trying to filter records using Django-style lookups (e.g., iexact, icontains, etc.), I’m running into difficulties. It seems that the lookup functions aren’t behaving correctly, possibly due to differences in how Visual FoxPro handles strings and cases.
  3. SQL Left Join Equivalent: I’m struggling to replicate the behavior of SQL LEFT JOIN in Django with these .dbf files. Given the limitations of Visual FoxPro and the lack of direct Django support, I’m not sure how to best approach this.

Has anyone here successfully worked with Visual FoxPro .dbf files in Django? How did you handle these or similar issues? Any suggestions or alternative approaches would be greatly appreciated!

Thank you in advance for your help!