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.

profiles.views module

Views to manage user profiles.

class profiles.views.IndexView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

get_context_data(**kwargs)[source]

Add recent Applications and DataSources to index page.

Returns:Django context dictionary
template_name = 'index.html'
class profiles.views.UserInactiveView(**kwargs)[source]

Bases: django.views.generic.base.TemplateView

template_name = 'profiles/user/inactive.html'
class profiles.views.UserManageTokenView(**kwargs)[source]

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

Manage an API Token for the requested user.

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

Revoke an API Token for the requested user.

model

alias of profiles.models.User

render_to_response(context, **response_kwargs)[source]

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

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

Bases: django.views.generic.detail.DetailView

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

Insert the single object into the context dict.

get_object(queryset=None)[source]

Return the object the view is displaying.

Require self.queryset and a pk or slug argument in the URLconf. Subclasses can override this to return any object.

template_name = 'profiles/user/profile.html'
class profiles.views.UserUriView(**kwargs)[source]

Bases: django.views.generic.detail.DetailView

View providing verification that a PEDASI User URI exists.

model

alias of profiles.models.User

render_to_response(context, **response_kwargs)[source]

Return a response, using the response_class for this view, with a template rendered with the given context.

Pass response_kwargs to the constructor of the response class.