def generate_doc(self, app_label, subdocs=False): from django.apps import apps con = connections['default'] # TODO app = apps.get_app_config(app_label) echo_by( 'djado/db/models.rst', app=app, connection=con, subdoc=subdocs)
def createdb_script(ctx, database): from django.conf import settings db = settings.DATABASES[database] echo_by('djado/{ENGINE}/createdb_script.sql'.format(**db), db=db)