Closed
Bug 1212951
Opened 9 years ago
Closed 9 years ago
The Credentials model appears as "Credentialss" in the admin panel
Categories
(Tree Management :: Treeherder: API, defect, P3)
Tree Management
Treeherder: API
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: emorley, Assigned: emorley)
References
Details
Attachments
(1 file)
Since otherwise it appears as "Credentialss" in the admin panel.
My bad for missing the model/table was plural during review.
It's not exactly critical, but if we don't change it now, it may be harder later when we have more people using Hawk credentials.
Guess we have two options:
1) Rename in code, then use migrations file
2) Create a new model, deploy, add "treeherder-etl" to that, switch in-repo code to use the new model, remove old model.
Assignee | ||
Comment 1•9 years ago
|
||
Hmm though it looks like "Credentials" is used to refer to the singular at times too, eg:
http://english.stackexchange.com/questions/252073/which-is-correct-credential-or-credentials
Perhaps given that and the fact that it would just be easier to use https://docs.djangoproject.com/en/1.8/ref/models/options/#verbose-name-plural - maybe we should just do that.
Assignee: nobody → emorley
Summary: Rename the "Credentials" model to "Credential" → The Credentials model appears as "Credentialss" in the admin panel
Assignee | ||
Updated•9 years ago
|
Priority: P2 → P3
Assignee | ||
Comment 2•9 years ago
|
||
Attachment #8671491 -
Flags: review?(cdawson)
Assignee | ||
Updated•9 years ago
|
Status: NEW → ASSIGNED
Updated•9 years ago
|
Attachment #8671491 -
Flags: review?(cdawson) → review+
Comment 3•9 years ago
|
||
Commit pushed to master at https://github.com/mozilla/treeherder
https://github.com/mozilla/treeherder/commit/c4134426ae230d00307dee96aa7ede127c7d75f6
Bug 1212951 - Set 'verbose-name-plural' for models that need it
By default Django appends an 's' onto the singular model name (in
addition to munging CamelCase) when generating the plural form that is
used in the admin panel/elsewhere. For example:
Device -> "devices"
RepositoryGroup -> "repository groups"
For some of our model names this doesn't make sense and results in
items in the admin panel like "Credentialss", "Bugscaches" or
"Repositorys", so we use verbose-name-plural to explicitly set the name
that should be used:
https://docs.djangoproject.com/en/1.8/ref/models/options/#verbose-name-plural
"Credentials" is valid for the singular (ie: model name), according to:
http://english.stackexchange.com/questions/252073/which-is-correct-credential-or-credentials
"ReferenceDataSignatures" should really be renamed to the singular, but
for now I've just left a TODO and set verbose-name-plural so it looks
less awkward in the admin panel.
Assignee | ||
Updated•9 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 9 years ago
Resolution: --- → FIXED
You need to log in
before you can comment on or make changes to this bug.
Description
•