Note

This is a public alpha release, and therefore features and functionality may change and the software and documentation may contain technical bugs or other issues. If you discover any issues please consider registering a GitHub issue.

applications.views module

Views to manage and access :class:`Application`s.

class applications.views.ApplicationCreateView(**kwargs)[source]

Bases: django.contrib.auth.mixins.PermissionRequiredMixin, django.views.generic.edit.CreateView

context_object_name = 'application'
fields = '__all__'
form_valid(form)[source]

If the form is valid, save the associated model.

model

alias of applications.models.Application

permission_required = 'applications.add_application'
template_name = 'applications/application/create.html'
class applications.views.ApplicationDeleteView(**kwargs)[source]

Bases: profiles.permissions.OwnerPermissionMixin, django.views.generic.edit.DeleteView

context_object_name = 'application'
model

alias of applications.models.Application

permission_required = 'applications.delete_application'
success_url = '/applications/'
template_name = 'applications/application/delete.html'
class applications.views.ApplicationDetailView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

context_object_name = 'application'
get_context_data(**kwargs)[source]

Insert the single object into the context dict.

get_template_names()[source]

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

  • the value of template_name on the view (if provided)
  • the contents of the template_name_field field on the object instance that the view is operating upon (if available)
  • <app_label>/<model_name><template_name_suffix>.html
model

alias of applications.models.Application

template_name = 'applications/application/detail.html'
class applications.views.ApplicationListView(**kwargs)[source]

Bases: django.views.generic.list.ListView

context_object_name = 'applications'
model

alias of applications.models.Application

template_name = 'applications/application/list.html'
class applications.views.ApplicationManageAccessView(**kwargs)[source]

Bases: profiles.permissions.OwnerPermissionMixin, core.views.ManageAccessView

Manage a user’s access to a Application.

On GET request will display the access management page. Accepts PUT and DELETE requests to add a user to, or remove a user from the access group. Request responses follow JSend specification (see http://labs.omniti.com/labs/jsend).

context_object_name = 'application'
model

alias of applications.models.Application

template_name = 'applications/application/manage_access.html'
class applications.views.ApplicationManageTokenView(**kwargs)[source]

Bases: profiles.permissions.OwnerPermissionMixin, django.views.generic.detail.DetailView

Manage an API Token for an application.

delete(request, *args, **kwargs)[source]

Revoke an API Token for the requested Application.

model

alias of applications.models.Application

render_to_response(context, **response_kwargs)[source]

Get an existing API Token or create a new one for the requested Application.

Returns:JSON containing Token key
class applications.views.ApplicationUpdateView(**kwargs)[source]

Bases: profiles.permissions.OwnerPermissionMixin, django.views.generic.edit.UpdateView

context_object_name = 'application'
fields = '__all__'
model

alias of applications.models.Application

permission_required = 'applications.change_application'
template_name = 'applications/application/update.html'