Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Usage with django_tables2 #72

Open
hdzierz opened this issue Oct 18, 2016 · 1 comment
Open

Usage with django_tables2 #72

hdzierz opened this issue Oct 18, 2016 · 1 comment

Comments

@hdzierz
Copy link

hdzierz commented Oct 18, 2016

I encountered a wee problem with using django_tables2. When passing an array of documents into the table from a queryset the column headings fall back to the default for verbose_name (None). I think the reason could be this part of the DjangoField constructor:

if self.verbose_name is None and self.name:
            self.verbose_name = self.name.replace('_', ' ')

self.verbose_name will never be set as self.name is undefined at that stage.

Does that make sense?

Cheers

@last-partizan
Copy link
Contributor

I don't think so, but i was writing that code for django 1.9, maybe something was changed. Try to insert some logging and debug it (or use pdb/ipdb)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants