@circumeo@mastodon.social avatar

circumeo

@circumeo@mastodon.social

Python/Django enthusiast 🐍 🚀

This profile is from a federated server and may be incomplete. Browse more on the original instance.

circumeo, to django
@circumeo@mastodon.social avatar

Trying to upload a directory and use webkitRelativePath to preserve the local path in a #django app, and it seems like that might not be so easy.

I've tried a custom upload handler, but even there, Django seems to have already stripped the path.

circumeo,
@circumeo@mastodon.social avatar

@adamchainz Sort of, I ended up using JSZip to zip the directory on the frontend before uploading it, so that I get the full paths. Couldn't figure out a way to do it without that.

circumeo,
@circumeo@mastodon.social avatar

@adamchainz I have some JS adding the webkitRelativePath as the filename in the multipart upload, and that seems to be where Django strips it off. If you look at UploadedFile class, it takes os.path.basename of the filename. I thought I could use a custom uploader but it's already stripped there too, although I'm not sure what's doing that.

circumeo, to django
@circumeo@mastodon.social avatar

Had fun writing a quick tutorial on using the library Neapolitan. TLDR: knock out those CRUD views at lightning speed with Neapolitan.

https://circumeo.io/blog/entry/faster-prototyping-in-django-with-neapolitan/

carlton, to startups
@carlton@fosstodon.org avatar

You say: "Stealth mode".

I hear: "We didn't do the website yet"

#Startups

circumeo,
@circumeo@mastodon.social avatar

@carlton I always enjoy the "should I have beta testers sign NDAs" question about startups.

I hear: we haven't tried getting users yet.

circumeo, to django
@circumeo@mastodon.social avatar

Anyone know if there's a way in #django to start handling a chunked transfer request before it's fully received? My use case is I want to start processing a file before the whole thing is received. I know I can do it with Channels, but just curious if I can rig up something in bog standard WSGI mode without dependencies.

circumeo,
@circumeo@mastodon.social avatar

@CodenameTim There may not be a way to do this, but I'm looking at the opposite, i.e. can a view function be called before the entire request is received (i.e. read n bytes of a file before the entire thing is buffered).

circumeo, to django
@circumeo@mastodon.social avatar

Just finished up a super simple #django app that uses PostgreSQL full-text search and HTMX to create a smooth search experience.

Wrote it up in a quick guide. Done this in a different or better way? I'd like to know how you went about it.

https://circumeo.io/blog/entry/build-a-live-search-feature-with-django-using-htmx-and-postgresql-fts-in-10-minutes/

circumeo, to django
@circumeo@mastodon.social avatar

The #django workshop series is off to the races! The plan is to meet weekly, starting on Sunday March 31st, to build features for our Meetup style web app.

The project roadmap and more is on Discord.

https://discord.gg/xz4HAvVU

circumeo, to django
@circumeo@mastodon.social avatar

We're only a few days away from the application deadline for the free #django workshop series I'll be hosting! In the series, we'll meet weekly to build a specific feature for a fictional Meetup style events app named EventGator.

If that sounds interesting, you can sign up for the workshop here:

https://circumeo.io/workshop/

circumeo, to django
@circumeo@mastodon.social avatar

I'll be hosting an intro to #django session with some live-coding in a little over a week! We'll build a (very) simple Meetup clone.

https://www.meetup.com/pythonic-webdevs-meetup/events/299430590/

webology, to random
@webology@mastodon.social avatar

🤔I got asked about this yesterday from a neighbor, a teacher in our local school district.

Teacher: "Isn't AI 4 to 5 times faster/better at coding than the best developers?"

Me: "Isn't AI 4 to 5 times faster/better at teaching than the best teachers?”

(shocked/disgusted look on her face)

🤷 And that's one of the problems of AI. It seems better than you at something you know nothing about because you don't quite know well enough to call it out on its bullshit. https://toot.cafe/@baldur/112031199817039932

circumeo,
@circumeo@mastodon.social avatar

@webology Reminds me of how, when reading a newspaper article about a subject I know nothing of, it seems entirely credible, but then if it's about something I actually do, like programming or rock climbing, you start to see the problems.

circumeo,
@circumeo@mastodon.social avatar

@webology My guess is there will be a wave similar to outsourcing, where C-suite sees it as a golden ticket, but overdoes it, and it swings back only after folks get burnt enough times.

circumeo, to random
@circumeo@mastodon.social avatar

Building a web-based IDE with Django templates, HTMX, and vanilla JS -- so far no regrets. This kind of app seems like a candidate for React but I have deep SPA fatigue.

I can eventually see the JS getting out of control and hard to understand. What are you using on the front-end in terms of lightweight libraries or frameworks?

circumeo, to django
@circumeo@mastodon.social avatar

Let's say you needed to run makemigrations on a #django project, but the twist is that the code is all stored in S3, and it's 3rd party code -- so assume it might try to delete / or do something else nasty.

I'm assuming only real solution is pull the code to a VM and run it.

Any other lighterweight ideas?

carlton, to random
@carlton@fosstodon.org avatar

Watching the CSS Holy War play out. Looks like there’s a while left in it yet. 🍿

circumeo,
@circumeo@mastodon.social avatar

@carlton There's a war? I must be so out of date. Still just writing plain CSS like a psychopath.

circumeo, to django
@circumeo@mastodon.social avatar

Working on the file/dir rename feature for the #django workshop web IDE, and jeez there are a lot of edge cases to consider.

circumeo, to python
@circumeo@mastodon.social avatar

#introduction Hi, I'm Zach, and excited to find a community of folks into #python and anything #django related!

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