Request¶
Qualified name: intranet.apps.logs.models.Request
- class intranet.apps.logs.models.Request(*args, **kwargs)[source]¶
Bases:
Model
This model is used to store access logs. It is not used by any other part of the intranet.
- Parameters:
Relationship fields:
- Parameters:
user (
ForeignKey
toUser
) – User (related name:request
)
Methods
get_next_by_timestamp
Finds next instance based on
timestamp
.get_previous_by_timestamp
Finds previous instance based on
timestamp
.Attributes
flag
Type:
CharField
id
Type:
AutoField
ip
Type:
TextField
method
Type:
TextField
objects
path
Type:
TextField
request
Type:
JSONField
request_json
request_json_obj
timestamp
Type:
DateTimeField
user
Type:
ForeignKey
toUser
user_agent
Type:
TextField
user_id
Internal field, use
user
instead.username