HackerTrans
トップ新着トレンドコメント過去質問紹介求人

brento

no profile record

投稿

Improving the New Django Developer Experience

epicserve.com
2 ポイント·投稿者 brento·2 年前·2 コメント

Serialize Django Data for JavaScript

epicserve.com
6 ポイント·投稿者 brento·4 年前·16 コメント

コメント

brento
·2 年前·議論
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 年前·議論
I've updated the article based on some of the feedback.
brento
·4 年前·議論
This is valid. I'll add an update to the post people should use caution and think about security.
brento
·4 年前·議論
In the article, you'll notice I'm not using DRF.
brento
·4 年前·議論
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 年前·議論
See my comment here: https://news.ycombinator.com/item?id=32750266
brento
·4 年前·議論
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 年前·議論
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 年前·議論
Here is the related change.org petition I signed.

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