util

Jacob Kaplan-Moss

June 8, 2010

D’oh:

django/contrib/admin/util.py
django/contrib/admindocs/utils.py
django/contrib/comments/views/utils.py
django/contrib/formtools/utils.py
django/contrib/gis/db/backends/util.py
django/contrib/gis/tests/utils.py
django/contrib/localflavor/it/util.py
django/contrib/localflavor/se/utils.py
django/contrib/localflavor/uy/util.py
django/contrib/messages/utils.py
django/core/files/utils.py
django/core/mail/utils.py
django/db/backends/util.py
django/db/utils.py
django/forms/util.py
django/http/utils.py
django/test/utils.py
tests/regressiontests/forms/util.py

Comments:

Florian Apolloner:

Yeah let's fix those, I never know when to use “util” and when it's “utils”

Francisco Souza:

I also never know when to use "util" or "utils" =/

Alex Gaynor:

You skipped the entire util (or is it utils...) directory :)

Hector Garcia:

I advocate for utils!

George Sakkis:

Funny coincidence.. just earlier today I was searching for something and was amused by the following:
$ find django (...)
...
django/http/utils.py
...
django/utils/http.py

:)

Stephen McDonald:

+1 for utils

drozzy@gmail.com:

Yes, when you see utilities file it is immediately clear what the purpose of it is :-)

Away with that evil - name the modules accordingly!

xiaket:

+1 for utils. which is be more reasonable(since we always dump a lot of utility functions into this file).

Paul Oswald:

forms.py
models.py
views.py

so... yeah go with utils.py :-)

Marcus Whybrow:

For what it is worth I would also advocate using utils.py. That's what I use personally and it seems the majority in the existing Django cases.

Peter Bengtsson:

+1 on utils unless the file does one single thing

Harro:

I'm for maybe_useful_maybe_not.
Because it usually is.

Adrian Holovaty:

I'm not sure how "util" got in there. The preference has always been "utils"...

Tomas Cirip:

+1 for utils

Scott:

I prefer "support".

Daniel Rosengren:

How about "tools"?

Leave a comment:

Use your real name, or risk deletion.

Optional.

No markup allowed. Linebreaks will be converted; links will be linkified.

Be nice; don't be that guy.