PrintJob

Qualified name: intranet.apps.printing.models.PrintJob

class intranet.apps.printing.models.PrintJob(*args, **kwargs)[source]

Bases: Model

Represents a submitted print job to Ion printing.

user

The user submitting the job.

Type:

User

printer

The printer to run the job on.

Type:

str

file

The file that the user submitted.

Type:

File

page_range

The page range to print.

Type:

str

time

The time the job was submitted.

Type:

datetime.datetime

printed

Whether the job was printed.

Type:

bool

num_pages

The number of pages in this job. This is calculated after converting the job.

Type:

int

duplex

Whether to print duplex.

Type:

bool

fit

Whether to fit to page.

Type:

bool

Parameters:

Relationship fields:

Parameters:

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

Methods

get_next_by_time

Finds next instance based on time.

get_previous_by_time

Finds previous instance based on time.

Attributes

duplex

Type: BooleanField

file

Type: FileField

fit

Type: BooleanField

id

Type: AutoField

num_pages

Type: IntegerField

objects

page_range

Type: CharField

printed

Type: BooleanField

printer

Type: CharField

time

Type: DateTimeField

user

Type: ForeignKey to User

user_id

Internal field, use user instead.