This happens when Django tries to set up the database connection. My project structure looks like a typical Django setup with a custom_backend folder at the root level.
What am I doing wrong? How can I properly set up my custom database backend?
yo lucaspixel23, sounds like a tricky situation. have u tried adding ‘init.py’ files to ur custom_backend folders? that might help with the package issue. for the NoneType error, double-check ur backend’s connection method. it might be returning None somewhere. debuggin’s gonna be ur best friend here, mate.
Implementing a custom database backend in Django is a complex task. From your error messages, it appears there might be issues with your backend’s structure and implementation. Ensure your custom_backend folder contains all necessary files, including ‘init.py’, ‘base.py’, and any required database-specific modules. The ‘ENGINE’ setting should point to the full path of your backend class, not just the folder. For example: ‘ENGINE’: ‘custom_backend.base.DatabaseWrapper’. Additionally, verify that your custom backend implements all required methods and attributes of Django’s database API. Consider studying Django’s built-in database backends as reference for proper implementation structure.