Daily Shaarli

All links of one day in a single page.

November 14, 2024

uv

🚀 A single tool to replace #pip, #pip-tools, #pipx, #poetry, #pyenv, #twine, #virtualenv, and more.

(par les mêmes personnes qui nous ont amené #ruff))

Two books, no longer apart. — Ethan Marcotte
thumbnail

Deux #livres gratuits sur le design web #responsive

GitHub - radiac/nanodjango: Full Django in a single file - views, models, API ,with async support. Automatically convert it to a full project.
thumbnail

#django in a single file

from django.db import models
from nanodjango import Django

app = Django()

@app.admin
class CountLog(models.Model):
    # Standard Django model, registered with the admin site
    timestamp = models.DateTimeField(auto_now_add=True)

@app.route("/")
def count(request):
    # Standard Django function view
    CountLog.objects.create()
    return f"<p>Number of page loads: {CountLog.objects.count()}</p>"

@app.api.get("/add")
def add(request):
    # Django Ninja API support built in
    CountLog.objects.create()
    return {"count": CountLog.objects.count()}

@app.route("/slow/")
async def slow(request):
    import asyncio
    await asyncio.sleep(10)
    return "Async views supported"
The Fedora KDE Spin Confirmed as an Alternative Official Edition for Workstation Users
thumbnail

#Fedora will no longer be a #GNOME-based distro. Now, you can have KDE Plasma as an official edition. (Mais uniquement à partir de l’édition #42 )