# mini_buildd.webapp module

mini-buildd’s web application

mini_buildd.webapp.get(*args, **kwargs)

class mini_buildd.webapp.Call(name, *args, **kwargs)

  Bases: `object`

  Run `django-admin` commands with error handling and smart logging

mini_buildd.webapp.migrate()

mini_buildd.webapp.init()

mini_buildd.webapp.set_admin_password(password)

  Set the password for the administrator

  Parameters:

    password (string) – The password to use.

mini_buildd.webapp.remove_system_artifacts()

  Bulk-remove all model instances that might have produced cruft on the system (outside mini-buildd’s home)

mini_buildd.webapp.loaddata(file_name)

mini_buildd.webapp.dumpdata(app_path)

class mini_buildd.webapp.SMTPCreds(creds)

  Bases: `object`

  SMTP creds string parser – format “USER:PASSWORD@smtp|ssmtp://HOST:PORT”

      >>> d = SMTPCreds(":@smtp://localhost:25")
      >>> (d.user, d.password, d.protocol, d.host, d.port)
      ('', '', 'smtp', 'localhost', 25)
      >>> d = SMTPCreds("kuh:sa:ck@smtp://colahost:44")
      >>> (d.user, d.password, d.protocol, d.host, d.port)
      ('kuh', 'sa:ck', 'smtp', 'colahost', 44)

mini_buildd.webapp.gen_django_secret_key()

mini_buildd.webapp.get_django_secret_key(home)

  Create django’s SECRET_KEY once and/or returns it

  Parameters:

    home (string) – mini-buildd’s home directory.

  Returns:

    string – the (created) key.

mini_buildd.webapp.configure(smtp_string)

  Configure django

mini_buildd.webapp.pseudo_configure(sqlite_path=':memory:')

  Pseudo-configure django (minimal setup to access models and run admin)

  Used internally only (where you need mini-buildd’s model classes, but no actual instances): sphinx doc, run doctest, django SQL migrations, …