Jump to >


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.


alias of User

fields = {u’username’: {u’type’: <type ‘str’>, u’description’: u”The user’s username.”}, u’first_name’: {u’type’: <type ‘str’>, u’description’: u”The user’s first name.”}, u’last_name’: {u’type’: <type ‘str’>, u’description’: u”The user’s last name.”}, u’url’: {u’type’: <type ‘str’>, 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’email’: {u’type’: <type ‘str’>, u’description’: u”The user’s e-mail address”}, u’fullname’: {u’type’: <type ‘str’>, u’description’: u”The user’s full name (first and last).”}, u’id’: {u’type’: <type ‘int’>, u’description’: u’The numeric ID of the user.’}}[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(*args, **kwargs)[source]

Retrieve the list of users on the site.