Skip to content

Show the proper version in the project dashboard #3307

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

Merged
merged 1 commit into from
Nov 27, 2017

Conversation

humitos
Copy link
Member

@humitos humitos commented Nov 23, 2017

The bug was introduced at

https://github.com/rtfd/readthedocs.org/pull/2944/files#diff-9a10ae0511ab8eb72096c4a0510a364eL38

Since the {% blocktrans %} was removed, the slug name was
undefined. Besides, there is no need to translate the slug, so the
first one was also removed

Fixes #3187

The bug was introduced at

https://github.com/rtfd/readthedocs.org/pull/2944/files#diff-9a10ae0511ab8eb72096c4a0510a364eL38

Since the {% blocktrans %} was removed, the `slug` name was
undefined. Besides, there is no need to translate the slug, so the
first one was also removed
@humitos
Copy link
Member Author

humitos commented Nov 24, 2017

A good way to find this kind of issues if by raising an exception on debug mode, for example: https://stackoverflow.com/a/15312316/2187091

We are abusing of the default django behaviour I my opinion, that it's to render a '' if the variable is not defined inside the template: https://github.com/rtfd/readthedocs.org/blob/f93e509f1a1c33fe8040b4db06735fdb1a4876c3/readthedocs/templates/core/project_bar_base.html#L54-L73

In this example, only the tab that is active is defined.

@agjohnson
Copy link
Contributor

Hah, good catch.

We are abusing of the default django behaviour I my opinion, that it's to render a '' if the variable is not defined inside the template

This looks to be unrelated, no? There's probably a better pattern here, but not important for this fix.

@humitos
Copy link
Member Author

humitos commented Nov 27, 2017

This looks to be unrelated, no? There's probably a better pattern here, but not important for this fix.

Yeah, this is unrelated to the fix. You can merge this and I can create another issue to change the approach for that specific thing.

@agjohnson agjohnson merged commit 90ac70d into master Nov 27, 2017
@agjohnson agjohnson deleted the humitos/dashboard/blank branch November 27, 2017 17:49
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

Successfully merging this pull request may close these issues.

2 participants