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