agateblue / agateblue/django-dynamic-preferences

Section's verbose_name not exposed over Rest API

Aberta
#230 0 comentários 0 reações 0 responsáveis Ver no GitHub
Linguagem predominante
Python
Estrelas
359
Forks
86
Métricas de merge de PRs
Nenhum PR com merge em 30d

Descrição

## Summary
`Section`'s `verbose_name` is missing in JSON serialized object. I would like to use this value to display human-friendly content.
### Details

Currently exposed data for a preference field
```
{
"section": "company",
"name": "companyname",
"identifier": "company__companyname",
"default": "My company",
"value": "My company",
"verbose_name": "Jméno společnosti",
"help_text": "Plné jméno společnosti, použité jako první řádek adresy",
"additional_data": {},
"field": {
"class": "CharField",
"widget": {
"class": "TextInput"
},
"input_type": "text"
}
},
```
### Fix?
Introduce a new value with key `section__verbose_name` or `section_verbose_name`. As I don't like not using nested serializer, but it's better than breaking backwards compatibility.

Are you guys interested in a pull request? I could maybe try to build a one.

Guia de contribuição

Abrir o guia de contribuição

Avaliação

Esta issue ainda não foi avaliada.

Receba novas issues na sua caixa de entrada

Um resumo curto de issues do GitHub para quem está começando.