django - How do I inspectdb 1 table from database which Contains 1000 tables -


i got schema contains 1000 tables,and many of them don't need, how can inspectdb tables need?

you can in python console, or in *.py file:

from django.core.management.commands.inspectdb import command django.conf import settings your_project_dir.settings import databases  #  replace `your_project_dir`  settings.configure() settings.databases = databases  command().execute(table_name_filter=lambda table_name: table_name in ('table_what_you_need_1', 'table_what_you_need_2', ), database='default') 

https://github.com/django/django/blob/master/django/core/management/commands/inspectdb.py#l32


Comments

Popular posts from this blog

matlab - "Contour not rendered for non-finite ZData" -

delphi - Indy UDP Read Contents of Adata -

javascript - Any ideas when Firefox is likely to implement lengthAdjust and textLength? -