Re: Testing Unmanaged Models - Using the SchemaEditor to create db tables

2024-02-12 Thread Emmanuel Katchy
Hi Adam, Thanks for your response! I understand your point about unmanaged models being a niche use case of Django. I've decided to proceed with creating a package and see how it goes. The new enterContext() and other methods in unittest seem interesting. I'll definitely be using them more

Re: Testing Unmanaged Models - Using the SchemaEditor to create db tables

2024-02-09 Thread 'Adam Johnson' via Django developers (Contributions to Django itself)
Hi Emmanuel Most activity from this mailing list has moved to Django Internals category on the forum: https://forum.djangoproject.com/c/internals/5 . Better to post there in future, or you could even duplicate this post. I think your approach is worth sharing in a blog post, or even a package,

Testing Unmanaged Models - Using the SchemaEditor to create db tables

2024-01-28 Thread Emmanuel Katchy
Hi everyone! I'd like to get your thoughts on something. Unmanaged models mean that Django no longer handles creating and managing schema at the database level (hence the name). When running tests, this means these tables aren't created, and we can't run queries against that model. The general