Django ORM

Dashboard models.

class smarter.apps.dashboard.models.EmailContactList(*args, **kwargs)[source]

Bases: TimestampedModel

Model to persist emails collected from landing page.

Parameters:
  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

  • email (Unknown) – Email

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

created_at

DateTimeField

Created at

Timestamp indicating when the model instance was created.

This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.

Type:

Type

email

EmailField

Email

Type:

Type

id: int

BigAutoField

Primary key: ID

The row’s primary key, which Django adds to every concrete model. Declared, without a value, only so that type checkers know it: Django ignores a bare annotation.

Type:

Type

objects = <django.db.models.Manager object>
updated_at

DateTimeField

Updated at

Timestamp indicating when the model instance was last updated.

This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.

Type:

Type

class smarter.apps.dashboard.models.OnboardingHint(*args, **kwargs)[source]

Bases: TimestampedModel

An onboarding hint that a user has seen, and what they did with it.

A hint shows by itself until the user has a row for it, in any of their accounts, so that it shows once per user, on any device. created_at is when they first saw it to the end.

Parameters:
  • user – The Django user.

  • hint – The hint, one of OnboardingHints.

  • outcome – What the user did with it, one of OnboardingOutcomes.

  • id (Unknown) – Primary key: ID

  • created_at (Unknown) – Created at

  • updated_at (Unknown) – Updated at

exception DoesNotExist

Bases: ObjectDoesNotExist

exception MultipleObjectsReturned

Bases: MultipleObjectsReturned

exception NotUpdated

Bases: ObjectNotUpdated, DatabaseError

created_at

DateTimeField

Created at

Timestamp indicating when the model instance was created.

This field is automatically set to the current date and time when the instance is first created. It is indexed in the database for efficient querying.

Type:

Type

get_hint_display(*, field=<django.db.models.CharField: hint>)

Shows the label of the hint. See get_FOO_display() for more information.

get_outcome_display(*, field=<django.db.models.CharField: outcome>)

Shows the label of the outcome. See get_FOO_display() for more information.

hint

CharField

Hint

Choices:

  • sidebar_llmclients

  • llmclient_weather

  • workbench_tour

Type:

Type

id: int

BigAutoField

Primary key: ID

The row’s primary key, which Django adds to every concrete model. Declared, without a value, only so that type checkers know it: Django ignores a bare annotation.

Type:

Type

objects = <django.db.models.Manager object>
outcome

CharField

Outcome

Choices:

  • clicked

  • dismissed

  • completed

  • visited

Type:

Type

updated_at

DateTimeField

Updated at

Timestamp indicating when the model instance was last updated.

This field is automatically updated to the current date and time whenever the instance is saved. It is indexed in the database for efficient querying.

Type:

Type

user

ForeignKey to User

User (related name: onboarding_hints)

Type:

Type

user_id

Internal field, use user instead.

class smarter.apps.dashboard.models.OnboardingHints(*values)[source]

Bases: TextChoices

The web console’s onboarding hints, which point a new user to where to go next.

Each id is also in the React package @smarter/onboarding, OnboardingHints in its src/lib/const.ts, which shows them.

LLMCLIENT_WEATHER = 'llmclient_weather'
SIDEBAR_LLMCLIENTS = 'sidebar_llmclients'
WORKBENCH_TOUR = 'workbench_tour'
class smarter.apps.dashboard.models.OnboardingOutcomes(*values)[source]

Bases: TextChoices

What the user did with an onboarding hint, which then never shows by itself again.

CLICKED = 'clicked'
COMPLETED = 'completed'
DISMISSED = 'dismissed'
VISITED = 'visited'