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

Test and fix missing titles. Fixes #784 #1203

Merged
merged 2 commits into from
May 26, 2016
Merged

Conversation

atodorov
Copy link
Contributor

@atodorov atodorov commented May 23, 2016

Here is a quick test for #784 and fixes to a number of templates. Notes:

  • pages/legal.html, pages/security.html and pages/sponsors.html are missing titles at the moment but are essentially empty.
  • assert will stop at the first failure.

On legacy PyPI the legal link points to http://www.python.org/about/legal. If we have the text I can add it to this template or modify the code to redirect to the same URL.

Do we want to copy the text from https://pypi.python.org/security for security.html ?

sponsors.html contains the following comment

{# Note: The actual sponsors page for PyPI is defined in pypi-theme #}

Please advise how to proceed with this PR.

Regards,
@MrSenko

@atodorov atodorov force-pushed the missing_titles branch 3 times, most recently from b70c2ff to fdfe7da Compare May 23, 2016 20:36
@dstufft
Copy link
Member

dstufft commented May 24, 2016

Hey @atodorov

What I would do for those three pages is just add a dummy title to them, something like {% block title %}Legal{% endblock %} for each one. That should get the tests passing, and then people can just fill in with the real title when the content for those pages get filled out (and this test will make sure they don't forget to do that if they delete the title block).

https://github.com/pypa/warehouse/issues/784
"""
dir_name = os.path.dirname(__file__)
dir_name = os.path.join(dir_name, '..', '..', 'warehouse', 'templates')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This should probably import warehouse and then do os.path.join(os.path.dirname(warehouse.__file__), "templates") to make this more resilient against the test code getting shuffled around.

@dstufft
Copy link
Member

dstufft commented May 26, 2016

One small adjustment, and then looks good to me to merge. Thanks!

@dstufft dstufft merged commit 47f92c7 into pypi:master May 26, 2016
@dstufft
Copy link
Member

dstufft commented May 26, 2016

✨ Awesome 🍰

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.

None yet

2 participants