Re: [Feature Request] Option to implicitly create tables within a database schema based on their model's app

2020-02-16 Thread Matt del Valle
EDIT: Actually, after some further digging it turns out it's worse than I thought. Unless I'm missing something it looks like there currently isn't any non-hacky way at all to set a table's schema in django. There are workarounds that involve SQL escaping hacks such as setting a model's db_na

[Feature Request] Option to implicitly create tables within a database schema based on their model's app

2020-02-16 Thread Matt del Valle
Hi, So currently django seems to take the name of your models (either inferring it from the model class name or, if provided, it takes it from the model Meta options), and prepends the name of the app the model belongs to with an underscore to avoid table name conflicts. It then creates that t

[Feature Request] Allow a Field/DeferredAttribute object everywhere a field name as a string is currently expected

2020-01-13 Thread Matt del Valle
Hiya, The title says it all. It would be dead useful if you could always use fields rather than the string name of a field, for example in a QuerySet order_by(), or in the BaseModelAdmin.ordering class attribute (and probably many more locations). This has the huge advantage of avoiding string