/explore
|
You are here |
www.laceyhenschel.com | ||
| | | | |
jinyuz.dev
Often, I forget how to display the raw SQL of a queryset in Django. This is a quick and easy example of how to do it from django.contrib.auth.models import User qs = User.objects.all() print(qs.query) SELECT "auth_user"."id", "auth_user"."password", "auth_user"."last_login", "auth_user"."is_superuser", "auth_user"."username", "auth_user"."first_name", "auth_user"."last_name", "auth_user"."email", "auth_user"."is_staff", "auth_user"."is_active", "auth_user"."date_joined" FROM "auth_user" |
|
| | | | | ||
| | | | |
www.rasulkireev.com
Whenever you building a site with Django that will have user authentication, it is recommended to create a Custom User Model, before the first migration. Sometimes you forget to do that. In this case you have to follow a strict procedure, which I'll show you in the post. |
|
| | | | | ||
| | | | |
alexgaynor.net
[AI summary] Alex, a software resilience engineer, demonstrates how to implement a read-only field in Django by subclassing FileField and modifying the widget rendering and validation logic. |
|
| | | | | ||
| | | | |
geoff.tuxpup.com
How I Start: Django, Tailwind, HTMX (part 1) I wanted to try out some "modern" front-end development for a while, and I did. FastAPI is great. So is Svelte. But even though I found creating APIs that way to be a breeze, building a whole site that way felt much slower and heavier than using traditional server rendering. So I decided to give django a fair shake for a while, and I'm glad I did. |
|
| | | |||