HackerTrans
TopNewTrendsCommentsPastAskShowJobs

brento

no profile record

Submissions

Improving the New Django Developer Experience

epicserve.com
2 points·by brento·2 yıl önce·2 comments

Serialize Django Data for JavaScript

epicserve.com
6 points·by brento·4 yıl önce·16 comments

comments

brento
·2 yıl önce·discuss
Dj-beat-drop is more about making minimal changes to the official Django templates. It mainly involves standardizing to a config directory for configuration code and optionally using an `env` file and `uv` for package management.

By keeping things minimal, the chances of it getting accepted as an official Django project seem better. It would need to be renamed, of course, to something like django-installer or django-cli.
brento
·4 yıl önce·discuss
I've updated the article based on some of the feedback.
brento
·4 yıl önce·discuss
This is valid. I'll add an update to the post people should use caution and think about security.
brento
·4 yıl önce·discuss
In the article, you'll notice I'm not using DRF.
brento
·4 yıl önce·discuss
I would certainly make improvements to the script to optimize the serialization of the QuerySet to only output the needed fields. It's hard to write an article that would capture every use case and optimization required.
brento
·4 yıl önce·discuss
See my comment here: https://news.ycombinator.com/item?id=32750266
brento
·4 yıl önce·discuss
This is an excellent point; I should have addressed safety in my article. I'll point out that in my use case, I'm using `safe` on data I create and not any user-generated data.

You should never use `safe` on user data unless you use something like bleach (https://github.com/mozilla/bleach) to sanitize the data. Even then, you should use caution.
brento
·4 yıl önce·discuss
Thank you for pointing this out, I forgot about this template filter. This unfortunately still wouldn't properly all the data types mentioned in my article (e.g. QuerySets).
brento
·4 yıl önce·discuss
Here is the related change.org petition I signed.

https://www.change.org/p/google-account-migration-from-works...