Skip to content

Linked otnames. #754

@lemonsaurus

Description

@lemonsaurus

We'd like to be able to link otnames together, so that they always appear at the same time. This issue needs to be handled at the same time as the problem is solved on the bot side, because both will rely on each other for proper testing. Bot issue can be found at python-discord/bot#658.

For example, we may want the following names to always appear together:
#ot0-what-is-your-name?
#ot1-what-is-your-quest?
#ot2-what-is-your-favorite-color?

  • Create a new field in the off topic channel name model called linked_names. This field should be an ArrayField that can have up to 3 CharFields. This is where we will put all the names that are linked, in the correct order.
  • Create a migration. The new field should be an empty array by default.
  • Create new views in the off topic names viewset. We will probably need one method for linking names together, and one for unlinking them. I leave this step only vaguely defined on purpose, because it may be useful to have some flexibility here if you run into design problems.

The basic idea is that, whenever we link names together, we will add all the names to all the otnames objects in this linked_names field. That way, no matter which one you get, you will have all the information you need without making additional queries.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions