Hacker News new | ask | show | jobs
by rlander 4387 days ago
For small apps, urls should definitely be defined near views. For larger apps, I would have to disagree. Here's why: Django's url routing system might be cumbersome when you just want to get going with a few routes. However, it acts as an "index" for all your app's urls when you've got tens (or hundreds) of route definitions. So, instead of opening every view file, you can "tree search" for a specific url path. It is very flexible (which can be a plus and a minus).