# mini_buildd.views module

mini_buildd.views.context(_request)

  Generate generic context. Will be available in any render, see `django_settings.py`

class mini_buildd.views.ExceptionMiddleware(get_response)

  Bases: `object`

  MBD_TEMPLATES = {'html': 'mini_buildd/error/index.html', 'html-snippet': 'mini_buildd/includes/error.html'}
  classmethod error(request, exception, output='html', status=HTTPStatus.INTERNAL_SERVER_ERROR)
  classmethod process_exception(request, exception)
  classmethod bad_request(request, exception)
  classmethod permission_denied(request, exception)
  classmethod page_not_found(request, exception)
  classmethod server_error(request)

class mini_buildd.views.TemplateView(**kwargs)

  Bases: `TemplateView`

  Original django class plus optional custom helpers

class mini_buildd.views.DefaultView(**kwargs)

  Bases: `TemplateView`

  Classic view from template; computes template name from request path (`/foo/` -> `foo/index.html`, `/foo/bar.html` -> `foo/bar.html`)

  get_template_names()

    Return a list of template names to be used for the request. Must return a list. May not be called if render_to_response() is overridden.

class mini_buildd.views.AccountRegisterView(**kwargs)

  Bases: `FormView`

  class TokenGenerator

    Bases: `PasswordResetTokenGenerator`

  TOKEN_GENERATOR = <mini_buildd.views.AccountRegisterView.TokenGenerator object>
  class Form(*args, **kwargs)

    Bases: `UserCreationForm`

    class Meta

      Bases: `object`

      model

        alias of `User`

      fields = ['username', 'email', 'password1', 'password2']
    base_fields = {'email': <django.forms.fields.EmailField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>, 'username': <django.forms.fields.CharField object>}
    declared_fields = {'email': <django.forms.fields.EmailField object>, 'password1': <django.forms.fields.CharField object>, 'password2': <django.forms.fields.CharField object>}
    property media

      Return all media required to render the widgets on this form.

  template_name = 'accounts/register/index.html'
  form_class

    alias of `Form`

  form_valid(form)

    If the form is valid, redirect to the supplied URL.

class mini_buildd.views.AccountActivateView(**kwargs)

  Bases: `DefaultView`

  get(request, *args, **kwargs)

class mini_buildd.views.AccountProfileView(**kwargs)

  Bases: `DefaultView`

  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

  dispatch(request, *args, **kwargs)

class mini_buildd.views.AccountNullView(**kwargs)

  Bases: `TemplateView`

  For python client login support only. See `net.ClientEndpoint.login()`

  get(request, *args, **kwargs)
  dispatch(request, *args, **kwargs)

class mini_buildd.views.BuildersView(**kwargs)

  Bases: `DefaultView`

  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

class mini_buildd.views.RouteView(**kwargs)

  Bases: `TemplateView`

  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

class mini_buildd.views.DirView(**kwargs)

  Bases: `RouteView`

  template_name = 'mini_buildd/dir.html'
  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

class mini_buildd.views.EmbedView(**kwargs)

  Bases: `TemplateView`

  template_name = 'mini_buildd/embed.html'

class mini_buildd.views.ManualView(**kwargs)

  Bases: `EmbedView`

  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

class mini_buildd.views.SetupView(**kwargs)

  Bases: `EmbedView`

  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

  dispatch(request, *args, **kwargs)

class mini_buildd.views.EventsView(**kwargs)

  Bases: `RouteView`

  template_name = 'mini_buildd/events/index.html'
  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

class mini_buildd.views.RepositoriesView(**kwargs)

  Bases: `RouteView`

  classmethod mbd_parse_distribution(repo, dist, suite)
  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

mini_buildd.views.get_client_ip(request)

class mini_buildd.views.APIView(**kwargs)

  Bases: `TemplateView`

  class Snippets

    Bases: `dict`

    Pre-computed dict of available specialized call templates (just add to or remove files from `includes/api/`)

  MBD_API_SNIPPETS = {'cancel': 'mini_buildd/includes/api/default.html', 'cronjob': 'mini_buildd/includes/api/default.html', 'debdiff': 'mini_buildd/includes/api/default.html', 'debmirror': 'mini_buildd/includes/api/default.html', 'dput_conf': 'mini_buildd/includes/api/default.html', 'handshake': 'mini_buildd/includes/api/default.html', 'keyring_packages': 'mini_buildd/includes/api/default.html', 'ls': 'mini_buildd/includes/api/default.html', 'migrate': 'mini_buildd/includes/api/default.html', 'port': 'mini_buildd/includes/api/default.html', 'port_ext': 'mini_buildd/includes/api/default.html', 'pub_key': 'mini_buildd/includes/api/default.html', 'reindex': 'mini_buildd/includes/api/default.html', 'remake_chroots': 'mini_buildd/includes/api/default.html', 'remove': 'mini_buildd/includes/api/default.html', 'retry': 'mini_buildd/includes/api/default.html', 'search': 'mini_buildd/includes/api/default.html', 'set_user_key': 'mini_buildd/includes/api/default.html', 'setup': 'mini_buildd/includes/api/default.html', 'show': 'mini_buildd/includes/api/default.html', 'snapshot_create': 'mini_buildd/includes/api/default.html', 'snapshot_delete': 'mini_buildd/includes/api/default.html', 'snapshot_ls': 'mini_buildd/includes/api/default.html', 'sources_list': 'mini_buildd/includes/api/default.html', 'start': 'mini_buildd/includes/api/default.html', 'status': 'mini_buildd/includes/api/default.html', 'stop': 'mini_buildd/includes/api/default.html', 'subscribe': 'mini_buildd/includes/api/default.html', 'test_packages': 'mini_buildd/includes/api/default.html', 'unsubscribe': 'mini_buildd/includes/api/default.html', 'uploaders': 'mini_buildd/includes/api/default.html', 'wake': 'mini_buildd/includes/api/default.html'}
  setup(request, *args, **kwargs)

    Initialize attributes shared by all view methods.

  get(request, *args, **kwargs)