BanGDream icon indicating copy to clipboard operation
BanGDream copied to clipboard

🗄🔧🌐 Skills Model

Open LatidoReMe opened this issue 6 years ago • 0 comments

TLDR: Skills implemented as a model to the site that's configurable via staff configurations

views.py

  • Created Skill API for staff and modified Card API's display of skill data

forms.py

  • Modified Card's skill filter to utilize a generate-able list based off staff configs and added Skill (Filter)Form

magicollections.py

  • Added Skill Collection and modified display of skill-related elements for (Collectible)Card
  • Temporarily removed connection to card form js (this PR is focusing on the main code and we need to decide what kind of js, if any we want to have in the future first)

🔧 populate_staffconfigurations_bang.py

  • This file creates the staff configurations with workable defaults for other developers. Template and general styling based off the similarly-named files in the MagiCircles repo and from my PR for SIT

🗄🌐 models.py

  • Created and used a few utility functions that could not be easily placed in utils.py (it entered an infinite loop)
  • Created Skill Model
  • Modified Card and Collectible Card models to implement new Skill Model

settings.py

  • Unrelated to the main goal of the PR, but I removed the dupe gallery button from the navbar

urls.py

  • Simply added the Skills API

Notes

  • While it isn't required, I think that when this does get merged, db should saves the current translations for skills and skill types. Once we add the skills back in with this new setup, we can add back in the needed translations, making the change less impactful on translations
  • All the code should work fine with the static code left as is. We can re-implement some form wizardry later if we want though
  • This is a huge PR so take your time, and thanks in advance for checking it out!

LatidoReMe avatar Jan 27 '19 08:01 LatidoReMe