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 django.contrib.auth.models.User

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


Retrieve the list of users on the site.