Hacker Newsnew | past | comments | ask | show | jobs | submit | akares's commentslogin

However, getting rid of the /photos prefix would be a terrible improvement.

Having the /{username} at the root of the routing logic means that every URL should either query the user database for a match or use /{username} as a catch-all fallback if no other patterns match. But this makes resolving real 404 pages much more expensive.


If you delete the photos path element they do actually have a fallback resolver that redirects you to the appropriate path under photos.

E.g. flickr.com/mwichary/sets/72177720330077904 does take you to flickr.com/photos/mwichary/sets/72177720330077904


I've been using this technique on my cat for a long time. For example, when something scares her, like fireworks in the street, she looks at me with her eyes wide open. In response, I slowly narrowing my eyes to let her know that I am relaxed and she immediately calms down.


> github.com/slmjkdbtl/dskill

You have a good coding style.


I was using Django Rest Framework for many years (and still using) but I can't recommend it to anybody. I would recommend FastAPI which is more straightforward and has modern features and not abandoned (like DRF is).


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: