Merge lp:~michael.nelson/ubuntu-webcatalog/788210-navigate-distroseries into lp:ubuntu-webcatalog
Status: | Merged |
---|---|
Approved by: | Michael Foord |
Approved revision: | 34 |
Merged at revision: | 28 |
Proposed branch: | lp:~michael.nelson/ubuntu-webcatalog/788210-navigate-distroseries |
Merge into: | lp:ubuntu-webcatalog |
Diff against target: |
385 lines (+182/-74) 8 files modified
django_project/config/main.cfg (+1/-0) src/webcatalog/context_processors.py (+5/-0) src/webcatalog/templates/webcatalog/application_detail.html (+2/-10) src/webcatalog/templates/webcatalog/install_options_snippet.html (+11/-0) src/webcatalog/templatetags/webcatalog.py (+81/-0) src/webcatalog/tests/test_views.py (+48/-4) src/webcatalog/urls.py (+4/-6) src/webcatalog/views.py (+30/-54) |
To merge this branch: | bzr merge lp:~michael.nelson/ubuntu-webcatalog/788210-navigate-distroseries |
Related bugs: |
Reviewer | Review Type | Date Requested | Status |
---|---|---|---|
Michael Foord (community) | Approve | ||
Review via email: mp+66268@code.launchpad.net |
Commit message
Redirect to series-specific app if series not provided (and refactor view code into template tag).
Description of the change
Overview
========
This branch does part of bug 788210 - redirecting to an app for a specific distroseries when we know the users distroseries, but is mostly moving existing code around to get ready for the next branch.
Details
=======
* Moved the fat from the application_detail view into a template tag
* Refactored the urls, removing the need for a separate application_
* Added a context processor to include the user-agent in the request context (so it can be used in a template tag).
To test: follow the readme to bootstrap and then `fab test`
This branch is landable as is, but in the following branch I plan to:
* Move the current view tests for the install options into template tag tests (and add some tests - it's telling me an app is not available for my distroseries while displaying the app for my distroseries)
* Refactor the get_user_os method to hopefully make it a bit more readable (removing distro_is_a_guess if possible)
* Add the list of other distroseries to the templates (second part of bug 788210)
* Fix an issue where currently we blindly assume that apps exist for our default distroseries... we should instead be finding the app with the highest released distroseries version (if a specific default is not set)
* Related to the last one, update the urls to use distroseries *versions* for released distroseries and codenames for unreleased series (consistent with ubuntu convention).