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 have successfully implemented a custom metaclass, that overrides __new__ 
in order to set the 'db_table' attribtue to what I want, however upon 
running makemigrations, this custom behavior is seemingly ignored.

This stack overflow question illustrates the problem. 
<https://stackoverflow.com/questions/51115249/django-migrations-ignoring-db-table-when-set-using-metaclass>

Is there some magic that I am not aware of going on inside makemigrations?

-- 
You received this message because you are subscribed to the Google Groups 
"Django developers  (Contributions to Django itself)" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-developers.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-developers/4319b82c-e5b7-49c4-811c-23d42ca612c6%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to