Comment 1 for bug 1046364

Revision history for this message
Michael Nelson (michael.nelson) wrote : Re: Provide distroseries and arch data in context variables for campaign templates

I'll add a branch with a test demoing that this does work without a code-change.

15:16 <noodles> So what does the bug require that the current implementation doesn't do? A per-campaign flag, instead of per-app?
15:17 <achuni> yep
15:18 <noodles> Why not use the unsupported_apps context variable? ie.
15:18 <noodles> Currently it already shows you for each app if it's not available, but you could also add at the top, without any code change:
15:19 <noodles> {% if unsupported_apps %}<p class="whateverflag">Some of the applications are not available for your computer.</p>{% endif %}
15:20 <achuni> yeah
15:20 <achuni> and something similar for when all apps are unsupported
15:20 <noodles> yep {% if apps == unsupported_apps %}...
15:21 * noodles checks if they would be equal lists in that case.
15:21 * achuni will give that a try
15:21 <achuni> sigh
15:21 <achuni> ...at some point
15:22 <noodles> I can check it out tomorrow, I just want to make sure I'm not missing something from the bug.
15:27 <noodles> Yep, according to CouponFormForUser, the two lists will indeed be equal when none of the apps are supported. I can add a test demoing it to the bug, or if there is something else required for the bug, just say so on the bug.