About URL Path vs. Query Parameters

When in doubt whether to use URL path or query parameters, follow this rule:

  • Use URL path to uniquely define resources: list views, detail views, form views.

    /jobs/
    /blog/2022/02/hello-world/
    /contact/
    
  • Use query parameters to define how the resource is displayed: item list or item grid, page 1 or page 10, web view or print view.

    /profiles/?show=grid
    /profiles/?page=10
    /profiles/?media=print
    

Tips and Tricks Web Design Architecture Django 5.2 Django 4.2 Django 3.2

Django/Python Consulting

If you have a specific Django challenge or integration you'd like to solve, I'd be happy to help. Book a free 30-minute call to discuss your project, see if we're a good fit, and explore the best approach for your needs. After the call, you'll receive a tailored cost estimate based on what we discuss.