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

unslugified chartname in include_container #56

Open
ingodjango opened this issue Apr 27, 2015 · 0 comments
Open

unslugified chartname in include_container #56

ingodjango opened this issue Apr 27, 2015 · 0 comments

Comments

@ingodjango
Copy link

Hi All,
I have an issues with version 0.13.7.

First is in NVD3Chart.py line 173-175: (from python-nvd3)

def _slugify_name(self, name):
    """Slufigy name with underscore"""
    self.name = slugify(name, separator='_')

I have a Container name that looks like 'ContainerName' in my template, also do include_container with that name.
Since slugify removes the capital letters d3.select will not be able to find the correct container.
In content.html in line 101:
d3.select('#{{ chart.name }} svg')
Will then look for 'containername svg' instead of 'ContainerName svg' .
The reason seems to be that in nvd3_tags in line 94 the chart name is an unslugified representation:
chart.name = str(include_container)
using:
chart.name = slugify(include_container, separator='_')
seems to work.

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

1 participant