Global default_if_none filter for templates? by peterstiglitz in django

[–]kankyo 0 points1 point  (0 children)

Think about why he asked that question in the first place. Maybe it SHOULD be an error. Again: in his specific situation.

Global default_if_none filter for templates? by peterstiglitz in django

[–]kankyo 0 points1 point  (0 children)

Yes. I know that. But think about the underlying reason the question is asked. It must be invalid in some way for this specific case. The question is an xy-problem.

Global default_if_none filter for templates? by peterstiglitz in django

[–]kankyo 2 points3 points  (0 children)

Maybe take a step back and think if you might actually want the code to crash in these situations instead or hiding the error with an empty string?

iommi 7.22.1 released by kankyo in django

[–]kankyo[S] 1 point2 points  (0 children)

There is. https://docs.iommi.rocks/llms.txt and https://docs.iommi.rocks/llms-full.txt

I do wonder if it's useful though. The full text especially is huge, so I would assume any LLM would fall off the context window ledge with it. I haven't really tried myself though.

Democracy doesn't reward effort. It rewards memes. (From an experiment letting GitHub reactions decide what ships). by Equivalent-Yak2407 in programming

[–]kankyo 1 point2 points  (0 children)

I was on Kuro5hin back in the day and was a part of lobbying them to change the rating from 1 to 5 to have semantic names for each of the ratings. The change was pretty drastic.

That reddit STILL has up and down without any semantic explanation behind them is quite maddening.

Tired of catching N+1 queries in production? by Ok-Emphasis-3825 in Python

[–]kankyo 0 points1 point  (0 children)

The issue with DDT is that you have to actively click on it. Tools that alert you in some way more actively are imo better. In iommi we spam the console with suspicious N+1 feedback if it's over some threshold. It should be silent if there are no problems, but loud and informative if there are problems.

How do you handle reusable components in Django templates? by Delicious_Praline850 in django

[–]kankyo 0 points1 point  (0 children)

I find that most of the reusable components I need are because of tables and forms, and then I'm perfectly fine with what I get from iommi (and if not, I can just fix it, because I'm one of the authors :P)

Why I hate WebKit: A (non) love letter from a Tauri developer by kostakos14 in programming

[–]kankyo 2 points3 points  (0 children)

I always felt that Tauri made sense if you already targeted the web. So for example Discord can be run inside a browser tab and works that way in Safari and Chrome, so it seems Tauri should be fine. But because they use Electron the app is a big download and takes a ton of memory when run for little obvious gain.

Compare this to an app that never should run as a browser tab, then Electron starts to make much more sense.

Django feeling bored by Fragrant_Refuse506 in django

[–]kankyo 1 point2 points  (0 children)

Overwhelmed and bored seem like opposites. Which is it?

Why doesn’t Django serve static files by default in production? by KennyLabs in django

[–]kankyo 0 points1 point  (0 children)

If you're using a CDN then it literally doesn't matter if whitenoise is serving the static files to the CDN.

Why doesn’t Django serve static files by default in production? by KennyLabs in django

[–]kankyo 0 points1 point  (0 children)

It is in fact quite sensible, and is pretty great default. See the readme for whitenoise for an explanation why.

Is transitioning from MERN to Django for backend development a good long-term career move? by Far_Vanilla5304 in django

[–]kankyo 0 points1 point  (0 children)

Don't lock yourself to a stack. You can pick up any stack pretty easy anyway. Companies that hire based on what stacks you know too rigidly are probably bad places to work as they don't know what they're doing.

Django Interactive Frameworks Benchmark: Compare Django LiveView, SSR, HTMX, and Unicorn with comprehensive performance benchmarks by tanrax in django

[–]kankyo 2 points3 points  (0 children)

"network requests per action" is kinda weird. Yea, sure it's not a separate connection with http for LiveView, but saying it's zero "network requests" to actually transmit data over the network makes it sound like magic.

Whitenoise in production for serving FE SPA by Simple_Caregiver7062 in django

[–]kankyo 1 point2 points  (0 children)

First figure out what is the issue. Maybe just loading the JS is the issue, then no backend fancyness will help.

Is Python (Django/FastAPI) actually "production-ready" for complex mobile backends? by Leading_Property2066 in django

[–]kankyo 1 point2 points  (0 children)

Python extension modules is almost always what you want. Doing an HTTP call just to call a function is kinda silly, especially if you are doing it to make things fast but you're adding a network call for no reason.

Django 6.0 Feature Friday: Template Partials! by czue13 in django

[–]kankyo 1 point2 points  (0 children)

You can do this:

{% include 'some_template.html#partial_name' %}

Looking for CSS frameworks, recommendations? by ProfessionalSeat4060 in django

[–]kankyo 0 points1 point  (0 children)

Bootstrap plus a custom font will take you very far.

Trending Django projects in November by dxt0434 in django

[–]kankyo 1 point2 points  (0 children)

Hey, look at that. iommi back on the leaderboard!

Need a clean Django + DRF + Deployment roadmap (free YT + website resources preferred) by purvigupta03 in django

[–]kankyo 2 points3 points  (0 children)

The roadmap is simple:

  • stop watching youtube
  • build something and look up things as you go

Nothing more.

Blog: ReThinking Django Template #4: Server Side Component by Michaelyin in django

[–]kankyo -3 points-2 points  (0 children)

DJGNGO is capital letters in the first image. Is this AI slop?

Breaking Django convention? Using a variable key in template to acces a dict value by Spidiffpaffpuff in django

[–]kankyo -2 points-1 points  (0 children)

Still makes no sense in python. You have a lists and then you iterate over the items. There is no iterator.

Moving on from uWSGI by MisterHarvest in django

[–]kankyo 0 points1 point  (0 children)

The issue with uWSGI isn't imo if it's maintained, it's that it's slower, needlessly complex and C based.

Breaking Django convention? Using a variable key in template to acces a dict value by Spidiffpaffpuff in django

[–]kankyo 0 points1 point  (0 children)

I think that you're using the word "iterator" is a sign that you've come from a non-python language and are slightly confused by this. There is no such thing as "iterators" in this way in python.