List of common MagiCircles prefixes and suffixes
deby edited this page Feb 14, 2023
·
4 revisions
↑ Parent: More
- Stands for:
Integer
, because it's used to save string choices as integers - Documentation: Save choices values as integer rather than strings
- Stands for:
CSV
, comma separated values - Documentation: Store comma separated values
- 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.
- Stands for:
Markdown
, for text fields that allow markdown formatting - Documentation: Store Markdown texts
- Stands for:
Dict of Markdown
, used to store dictionaries of texts that allow markdown formatting within model fields - Documentation: Store dictionaries and Store Markdown texts
- Stands for:
JSON
, store raw JSON data - Documentation: Store JSON
- Stands for:
Cache
- Documentation: Use an internal cache for foreign keys in models
- 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
andhttp_{}_original_url
- 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
andhttp_{}_thumbnail_url
- 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
andhttp_{}_thumbnail_url
- 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
andhttp_{}_2x_url
- Stands for:
Translated
, accessor for translated values - Documentation: Translate fields values in multiple languages
- Stands for:
Display
, used to customize how a field should be displayed in views - Documentation: Customize views with MagiModel properties
- Stands for:
Has
, fori_
choices only, to check if it has a value - Documentation: Save choices values as integer rather than strings
- Stands for:
Cached
, to access values that have been cached - Documentation: Use an internal cache for foreign keys in models
- Stands for:
Cached translated
, access a translation within a cached item - Documentation: Use an internal cache for foreign keys in models
- Stands for:
HTTP URL
, for files and images, allows you to get a full URL that starts withHTTP
(vs{}_url
which would give you a URL that starts with '//') - Documentation: MagiModel images and files
- Stands for:
URL
, for files and images, allows you to get a URL that starts with//
(see alsohttp_{}_url
) - Documentation: MagiModel images and files
- Stands for:
HTTP URL
, for files and images, allows you to get a full URL that starts withHTTP
(vs{}_url
which would give you a URL that starts with '//') - Documentation: MagiModel images and files
- 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).
- 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 whenNone
.
- 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 youNone
if there are no value, this one will return what's in_original
as a fallback
- Stands for:
Image
, shortcut to access the image of an i_ choice - Documentation: Save choices values as integer rather than strings
→ Next: Coding style
I. Introduction
II. Tutorials
III. References
- Files tree
- Default collections
- Default pages
- Website settings
- MagiCollection settings
- Abstract models
- Abstract collections
- MagiForm settings
- MagiFiltersForm settings
- Single pages settings
IV. Utils
-
MagiModel utils
- MagiModel images and files
- DateTime fields
- BaseAccount model
- Save choices values as integer rather than strings
- Store comma separated values
- Store dictionaries
- Store Markdown texts
- Translate fields values in multiple languages
- Store JSON
- More model field types
- Transform images before saving them
- Check choices at form level instead of model level
- Use an internal cache for foreign keys in models
- Customize views with MagiModel properties
- Events
- Form utils
- Python utils
- Templates utils
- Javascript utils
- Enable and disable existing collections and pages
- Translations
- Page titles and descriptions
- Characters
- Seasons
- Roles and permissions
- Allow your staff team to change configurations
- Custom users preferences and settings
- Background illustrations
- Activities tabs
- Corner popups
VI. More