-
Notifications
You must be signed in to change notification settings - Fork 11
Files tree
deby edited this page Aug 17, 2022
·
10 revisions
↑ Parent: References
This is the recommended file tree for your MagiCircles projects.
Required files are marked with ✳️. Any other file is optional and you should only create them if needed.
${PROJECT}
should be replaced with the short name of the project.
-
${PROJECT}/
: main folder that contains your source code- ✳️
settings.py
: the settings of your website: Website settings - ✳️
models.py
: your models: MagiModel - ✳️
magicollections.py
: your magicollections: MagiCollection -
magifields.py
: your MagiFields -
forms.py
: your forms: MagiForm (including filter forms: MagiFiltersForm) -
views.py
: your standalone pages: Single pages -
utils.py
: your utility functions -
admin.py
: settings of your admin panel (for super users only) -
django_translated.py
: terms translated by django (See ⎡Avoid generating translation terms for terms already available in Django framework⎦) -
templates/
: your django templates-
items/
: templates for item views: MagiCollection settings in Item view-
IdolItem.html
: a template for an example collectionIdol
-
-
pages/
: templates for your standalone pages -
include/
: partial templates included in other templates
-
- ✳️
static/
:- ✳️
img/
: your images- ✳️
avatar.png
: avatar used by default when users don't provide it - ✳️
${PROJECT}.png
: your illustration image -
${PROJECT}_logo.png
: the logo on your homepage -
${PROJECT}_logo_ja.png
: the logo for a specific language -
name_of_the_game.png
: illustration of the game - ✳️
favicon.ico
: your favicon -
rarity/
: example of the name of a field that contains a choice. this folder is used with cuteform-
1.png
: image for the choice (1 corresponds to the value) -
2.png
: //
-
- ✳️
- ✳️
js/
: your javascript sources- ✳️
main.js
: your main js file, loaded on all pages
- ✳️
- ✳️
less/
: your LESS sources- ✳️
style.less
: your main LESS file -
mixins/
: your mixins
- ✳️
- ✳️
css/
: CSS compiled from LESS sources goes here-
style.css
: your compiled CSS file
-
-
bower/
: Frontend dependencies get automatically installed here
- ✳️
-
locale/
: translation files.po
and.mo
-
management/commands/
: your custom commands-
generate_settings.py
: script to generate cached settings, see ⎡Use generated settings⎦
-
-
migrations
: your migration files (auto-generated by django)
- ✳️
- ✳️
${PROJECT}_project/
: app deployment settings- ✳️
settings.py
: django settings -
local_settings.py
: your local settings, should not be committed to your repo -
generated_settings.py
: generated by yourgenerate_settings
command - ✳️
urls.py
: your router for URLS - you shouldn't need to configure it, as MagiCircles will take care of that using your magicollections and enabled pages - ✳️
wsgi.py
: WSGI config
- ✳️
-
api/
: if you provide a REST API, the sources will be here - ✳️
bower.json
: your frontend requirements - ✳️
.bowerrc
: configuration of frontend requirements installation -
.gitignore
: the list of files that shouldn't be committed -
README.md
: description of your repository - ✳️
manage.py
: default django script script to run commands - ✳️
requirements.txt
: your python dependencies
→ Next: Default collections
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