ComputerRegistration

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

class intranet.apps.itemreg.models.ComputerRegistration(id, user, manufacturer, model, serial, description, screen_size, added)[source]

Bases: Model

Parameters:

Relationship fields:

Parameters:

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

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

computer_name

Returns a description of the computer, formatted as <screen size>" <manufacturer> <model>.

description

Type: TextField

id

Type: AutoField

manufacturer

Type: CharField

model

Type: CharField

objects

screen_size

Type: PositiveIntegerField

serial

Type: CharField

user

Type: ForeignKey to User

user_id

Internal field, use user instead.

property computer_name: str

Returns a description of the computer, formatted as <screen size>” <manufacturer> <model>.

Returns:

A nicely formatted description of the computer.