Example #1
0
File: sql.py Project: hdknr/djado
 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)
Example #2
0
File: db.py Project: hdknr/djado
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)