PhoneRegistration

Qualified name: intranet.apps.itemreg.models.PhoneRegistration

class intranet.apps.itemreg.models.PhoneRegistration(id, user, manufacturer, model, imei, description, added)[source]

Bases: Model

Parameters:

Relationship fields:

Parameters:

user (ForeignKey to User) – User (related name: phoneregistration)

Methods

get_manufacturer_display

Shows the label of the manufacturer.

get_next_by_added

Finds next instance based on added.

get_previous_by_added

Finds previous instance based on added.

Attributes

MANUF_CHOICES

added

Type: DateTimeField

description

Type: TextField

id

Type: AutoField

imei

Type: CharField

manufacturer

Type: CharField

model

Type: CharField

objects

phone_name

Returns a description of the phone, formatted as <manufacturer> <model>.

user

Type: ForeignKey to User

user_id

Internal field, use user instead.

property phone_name: str

Returns a description of the phone, formatted as <manufacturer> <model>.

Returns:

A nicely formatted description of the phone.