Jump to >

djblets.webapi.resources.user

Built-in resource representing the User model.

class UserResource[source]

Bases: djblets.webapi.resources.base.WebAPIResource

A default resource for representing a Django User model.

model[source]

alias of django.contrib.auth.models.User

fields = {'email': {'description': "The user's e-mail address", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'first_name': {'description': "The user's first name.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'fullname': {'description': "The user's full name (first and last).", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'id': {'description': 'The numeric ID of the user.', 'type': <class 'djblets.webapi.fields.IntFieldType'>}, 'last_name': {'description': "The user's last name.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'url': {'description': "The URL to the user's page on the site. This is deprecated and will be removed in a future version.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}, 'username': {'description': "The user's username.", 'type': <class 'djblets.webapi.fields.StringFieldType'>}}[source]
uri_object_key = 'username'[source]
uri_object_key_regex = "[A-Za-z0-9@\\._\\-\\'\\+]+"[source]
model_object_key = 'username'[source]
autogenerate_etags = True[source]
allowed_methods = ('GET',)[source]
serialize_fullname_field(user, **kwargs)[source]
serialize_url_field(user, **kwargs)[source]
has_modify_permissions(request, user, *args, **kwargs)[source]

Return whether or not the user can modify this object.

get_list(**kwargs)[source]

Retrieve the list of users on the site.

__annotations__ = {}