def METHOD_NAME(self, options):
    """Build the context used to render templates."""
    dburl = options.get("dburl")
    db_settings = (
        dj_database_url.config(default=dburl)
        if dburl else settings.DATABASES["default"])
    if "sqlite" in db_settings["ENGINE"]:
        dbtype = "sqlite"
    elif "postgresql" in db_settings["ENGINE"]:
        dbtype = "postgres"
    else:
        dbtype = "mysql"
    dbhost = db_settings.get("HOST", "127.0.0.1")
    dbport = db_settings.get("PORT", "")
    if len(dbport):
        dbhost += ':' + dbport
    commandline = "{} {}".format(
        os.path.basename(sys.argv[0]), " ".join(sys.argv[1:]))
    context = {
        "date": timezone.now(),
        "commandline": commandline,
        "dbtype": dbtype,
        "dbuser": db_settings["USER"],
        "dbpass": db_settings["PASSWORD"],
        "dbname": db_settings["NAME"],
        "dbhost": dbhost
    }
    return context