Skip to content

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 collection Idol
      • 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
    • 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 your generate_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

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