webology,
@webology@mastodon.social avatar

🎒 Everyone struggles with Django's static files: https://micro.webology.dev/2024/04/30/everyone-struggles-with.html

e11bits,
@e11bits@fosstodon.org avatar

@webology Using the last couple of days I asked myself what the difference is between the assets and static folder? And I wasn't the first. So assets hosts files that can/must be processed and static contains files that are used as is. For I think it is more obvious what the purpose of those two directories are by naming them static/src and static/public as suggested by @josh.

webology,
@webology@mastodon.social avatar

@e11bits @josh I think the struggle also is troubleshooting when something goes wrong.

I don't mind the */src pattern, but with bigger apps with node+django, I tend to prefer having all of the typescript+js in one top-level folder and all of the python files in another.

josh,
@josh@joshthomas.dev avatar

@webology @e11bits I don’t love or hate the pattern when it’s a bigger app, I think I’ve just gotten used to it now. Plus I like the consistency between them and the smaller apps that don’t have a JS framework.

josh,
@josh@joshthomas.dev avatar

@webology @e11bits not using a file explorer and instead using a fuzzy finder for files ala telescope in Neovim makes this easier to deal with IMO too

  • All
  • Subscribed
  • Moderated
  • Favorites
  • random
  • DreamBathrooms
  • magazineikmin
  • ethstaker
  • InstantRegret
  • tacticalgear
  • rosin
  • love
  • Youngstown
  • slotface
  • ngwrru68w68
  • kavyap
  • cubers
  • thenastyranch
  • mdbf
  • provamag3
  • modclub
  • GTA5RPClips
  • normalnudes
  • khanakhh
  • everett
  • cisconetworking
  • osvaldo12
  • anitta
  • Leos
  • Durango
  • tester
  • megavids
  • JUstTest
  • All magazines