Re: Difficulty setting dynamic 'db_table' in Meta

2019-06-26 Thread Brock Hallenbeck
Sorry for the confusion. That post is not actually me, just an identical situation. I am in fact on 2.2. It's just frustrating because I can raise an arbitrary exception in my metaclass and makemigrations will fail because of it, so I know the code is being run. It just seems to be inexplicably

Re: Difficulty setting dynamic 'db_table' in Meta

2019-06-26 Thread Adam Johnson
Hi, The SO post shows you (?) testing on Django 1.10, have you tried with the latest 2.2? You could also try implementing this with just a class decorator which is much more likely to work, although it’s not inheritable. You could also enforce with a a custom system check for manual declaration

Difficulty setting dynamic 'db_table' in Meta

2019-06-26 Thread Brock Hallenbeck
I am trying to modify django's default table naming scheme to better suit my needs and am having some difficulty. In order to accomplish this I need access to the 'app_label' and 'model_name' attributes. However due to python's scoping, I am unable to do so in your standard Meta subclass. I ha

Re: [Feature Request][Model, ORM] Disabling a field before removal to support continuous delivery

2019-06-26 Thread 'Matthieu Rudelle' via Django developers (Contributions to Django itself)
Does that sound like feature-request material? It seems to me django is the good place to add this flexibility as it has exclusive access to the underlying DB. On Tue, Jun 25, 2019 at 9:08 AM Matthieu Rudelle wrote: > How does the "safe" field of migrations work with other migrations related >>