• Greg Hardy (former Carolina Panther, beat his girlfriend up, bad guy) won his UFC fight last night via unanimous decision but then was ruled a NC after because he used an inhaler between rounds 2 and 3. Crazy, first time I’d ever seen this.
    • Chris Weidman has lost 5 of his last 6 fights (all KO/TKO finishes). Joe Lauzon came back and won tho!
    • Enrolled in autopay for the citi card. It doesn’t activate until next month, so I’ll have to make a manual payment for this statement.
    • get_flashed_messages() is a flask capability. You can basically flash a message inside any route, and then it will be displayed on the next request.
    • Jinja.
      • `include` will return already-rendered content from another file. You can’t inject a block into it, like you can with `extends`.
      • Blocks can’t be conditional. Just make the content conditional in the other template.
    • Supercontest.
      • Moved the flashed_messages over from alerts (the flask-user default) to notify.js. Much cleaner, and consistent with the rest of the app. Migrated the js to the toplevel layout as well, rather than the flask_user template, so it flashes on every site in the app. This is much better because you might be exiting a user view and going to a contest view (which is the case during normal login), and you want the message to display right away.
      • Restructured the contest views a tiny bit to extend the contest view header so that it could inject the title block (they were previously only `include`).
      • Got rid of the contest routes passing “label” back. It’s no longer necessary with the generic “View” title in the navbar and the specific route title in the contest_view_header.
      • Pretty substantial change for season/week/league filtering in the TEMPLATE layer instead of the backend routes. Makes it a lot easier to manage. A log was able to be consolidated. Just conditionals in html now, mostly, for what gets shown to the user.
        • Along with this came easy stuff like: don’t show leagues on matchups page, don’t show week on lb, etc.
      • Renamed graph to progression. In title and such only, not in endpoint.
      • Added a macro that returns card header title with h3 and mb-0.
      • Could add some extends for the card/card-body/row/col, but they’re all pretty different so this inheritance wouldn’t save a ton (diff sizes for col breakpoints mostly). It’s also less direct/explicit.
      • Made it so the “View” nav dropdown is available at all times, even when you’re looking at the basic secondary ones (rules, stats, etc). This just meant building url_for with NO arguments, if coming from those routes. All the url_defaults were already in place on the app side.
      • Changed my int-casting into the proper divisibleby(1) (jinja built-in test), and moved it to a macro. Rounds to one decimal place if float. Returns a string in either case.
    • Galantis concert at the Shrine.