- PW
- Watched another tutorial on hidden API manipulation. You really can do some deep inspection with just chrome alone. Adding x-csrf-token headers, scraping for routes, etc. Remember, just run a single get in the same session to grab the token before adding it to headers in subsequent requests. https://www.youtube.com/watch?v=6zge0N962aw.
- Single page applications, server side rendering, and nuxt.js (for universal vue apps) – https://scotch.io/tutorials/building-a-universal-application-with-nuxtjs-and-django. next.js is React’s framework for this.
- Few small improvements to my bbq game. Ordered a spice dispenser for even rubs, as well as 24″ butcher paper for single-sheet wrapping (it was leaking through my separate 12″ sheets). Also going to try using the coffee grinder next time for pepper – the hand crank is way too slow.
- You can access jinja template variables within javascript if you use the html rendering as a proxy. Put this in your template: <script>const myVar = ‘{{ my_var }}’;</script>. This doesn’t work if you put it in a separate javascript file, because that isn’t rendered.
- Continued Altered Carbon. While a great show, I still don’t like this genre. It’s unsatisfying as a viewer to not be able to trust any scene you’re presented. It’s a deus ex machina on steroids, favoring the show instead of the audience. It’s a complexity which hurts the viewer experience rather than adding depth and substance to its plot. Climaxes and resolutions in such worlds aren’t clever; they’re easy.
- Template variables are cast into objects (not just strings). This can cause complications between python datatypes and javascript datatypes. Strings are easy. For lists, use the tojson filter {{var|tojson}}. For others, look it up.
- Multiple elements within the same DOM cannot have the same ID. Use classes to group different elements together, if desired (even if there’s no associated styling).
- SC
- Worked on commit_picks, parsing the data from the request all the way through writing it to the db.
- Updated the descriptions on some existing tickets based off new realizations.
- Serverside and clientside verification of all picks.
- Emails the user upon pick submission (optionally). Checks and balances, baby. At least until people trust the interface.
- Changed the table to use classes to group matchup rows and identify the specific columns. Previously, I was using js to find the header and do string matching, or explicitly stating column index. Ridiculous.
- Handled the submit button logic. Disappears during the ajax call, and reappears if any changes to the picks are made. The user is notified if the picks were committed successfully.