Skip to content

List of common MagiCircles prefixes and suffixes

deby edited this page Feb 14, 2023 · 4 revisions

↑ Parent: More

Prefixes

Model fields

i_

c_

d_

  • Stands for: Dict, used to store dictionaries within model fields
  • Documentation: Store dictionaries
  • Note: Used by translated fields to store translations. Key = language, value = translated value.

m_

  • Stands for: Markdown, for text fields that allow markdown formatting
  • Documentation: Store Markdown texts

d_m_

j_

  • Stands for: JSON, store raw JSON data
  • Documentation: Store JSON

_cache_

_original_

  • Stands for: Original image file, before it was optimized with TinyPNG
  • Documentation: MagiModel images and files
  • Note: use recommended accessor with suffix {}_original, as well as {}_original_url and http_{}_original_url

_tthumbnail_

  • Stands for: TinyPNG Thumbnail, a thumbnail generated by TinyPNG
  • Documentation: MagiModel images and files
  • Note: use recommended accessor with suffix {}_thumbnail, as well as {}_thumbnail_url and http_{}_thumbnail_url

_thumbnail_

  • Stands for: Thumbnail, a thumbnail generated by our server, not optimized
  • Documentation: MagiModel images and files
  • Note: use recommended accessor with suffix {}_thumbnail, as well as {}_thumbnail_url and http_{}_thumbnail_url

_2x_

  • Stands for: 2 times the size of the original image, an upgraded version of the original, generally generated by Waifu2x
  • Documentation: MagiModel images and files
  • Note: use recommended accessor with suffix {}_2x, as well as {}_2x_url and http_{}_2x_url

Model properties

t_

display_

has_

cached_

cached_t_

http_{}_url

  • Stands for: HTTP URL, for files and images, allows you to get a full URL that starts with HTTP (vs {}_url which would give you a URL that starts with '//')
  • Documentation: MagiModel images and files

Suffixes

Model properties

_url

  • Stands for: URL, for files and images, allows you to get a URL that starts with // (see also http_{}_url)
  • Documentation: MagiModel images and files

http_{}_url

  • Stands for: HTTP URL, for files and images, allows you to get a full URL that starts with HTTP (vs {}_url which would give you a URL that starts with '//')
  • Documentation: MagiModel images and files

_thumbnail

  • Stands for: Thumbnail
  • Documentation: MagiModel images and files
  • Note: recommended accessor for images saved in _thumbnail_ and _tthumbnail_. Fallback to regular image (optimized or not).

_2x

  • Stands for: 2 times the size of the original image, an upgraded version of the original, generally generated by Waifu2x
  • Documentation: MagiModel images and files
  • Note: recommended accessor for images saved in _2x_{}, no fallback when None.

_force_2x

  • Stands for: 2 times the size of the original image, an upgraded version of the original, generally generated by Waifu2x
  • Documentation: MagiModel images and files
  • Note: unlike accessor _2x that gives you None if there are no value, this one will return what's in _original as a fallback

_image

→ Next: Coding style

I. Introduction

II. Tutorials

  1. Collections
    1. MagiModel
    2. MagiCollection
    3. MagiForm
    4. MagiFiltersForm
    5. MagiFields
  2. Single pages
  3. Configuring the navbar

III. References

IV. Utils

V. Advanced tutorials

VI. More

Clone this wiki locally