|
72 | 72 | from olympia.reviewers.models import Whiteboard
|
73 | 73 | from olympia.reviewers.utils import ReviewHelper
|
74 | 74 | from olympia.users.models import (
|
75 |
| - DeveloperAgreementRestriction, |
76 | 75 | SuppressedEmailVerification,
|
77 | 76 | )
|
78 | 77 | from olympia.users.tasks import send_suppressed_email_confirmation
|
@@ -1952,26 +1951,33 @@ def request_review(request, addon_id, addon):
|
1952 | 1951 |
|
1953 | 1952 |
|
1954 | 1953 | def docs(request, doc_name=None):
|
| 1954 | + def mdn_url(doc): |
| 1955 | + return MDN_BASE + doc |
| 1956 | + |
| 1957 | + def ext_url(doc): |
| 1958 | + return settings.EXTENSION_WORKSHOP_URL + doc |
| 1959 | + |
1955 | 1960 | mdn_docs = {
|
1956 |
| - None: '', |
1957 |
| - 'getting-started': '', |
1958 |
| - 'reference': '', |
1959 |
| - 'how-to': '', |
1960 |
| - 'how-to/getting-started': '', |
1961 |
| - 'how-to/extension-development': '#Extensions', |
1962 |
| - 'how-to/other-addons': '#Other_types_of_add-ons', |
1963 |
| - 'how-to/thunderbird-mobile': '#Application-specific', |
1964 |
| - 'how-to/theme-development': '#Themes', |
1965 |
| - 'themes': '/Themes/Background', |
1966 |
| - 'themes/faq': '/Themes/Background/FAQ', |
1967 |
| - 'policies': '/AMO/Policy', |
1968 |
| - 'policies/reviews': '/AMO/Policy/Reviews', |
1969 |
| - 'policies/contact': '/AMO/Policy/Contact', |
1970 |
| - 'policies/agreement': '/AMO/Policy/Agreement', |
| 1961 | + None: mdn_url(''), |
| 1962 | + 'getting-started': mdn_url(''), |
| 1963 | + 'reference': mdn_url(''), |
| 1964 | + 'how-to': mdn_url(''), |
| 1965 | + 'how-to/getting-started': mdn_url(''), |
| 1966 | + 'how-to/extension-development': mdn_url('#Extensions'), |
| 1967 | + 'how-to/other-addons': mdn_url('#Other_types_of_add-ons'), |
| 1968 | + 'how-to/thunderbird-mobile': mdn_url('#Application-specific'), |
| 1969 | + 'how-to/theme-development': mdn_url('#Themes'), |
| 1970 | + 'themes': mdn_url('/Themes/Background'), |
| 1971 | + 'themes/faq': mdn_url('/Themes/Background/FAQ'), |
| 1972 | + 'policies': ext_url('/documentation/publish/add-on-policies'), |
| 1973 | + 'policies/faq': ext_url('/documentation/publish/add-on-policies-faq'), |
| 1974 | + 'policies/agreement': ext_url( |
| 1975 | + '/documentation/publish/firefox-add-on-distribution-agreement' |
| 1976 | + ), |
1971 | 1977 | }
|
1972 | 1978 |
|
1973 | 1979 | if doc_name in mdn_docs:
|
1974 |
| - return redirect(MDN_BASE + mdn_docs[doc_name], permanent=True) |
| 1980 | + return redirect(mdn_docs[doc_name], permanent=True) |
1975 | 1981 |
|
1976 | 1982 | raise http.Http404()
|
1977 | 1983 |
|
@@ -2009,7 +2015,6 @@ def render_agreement(request, template, next_step, **extra_context):
|
2009 | 2015 | # potential errors highlighted)
|
2010 | 2016 | context = {
|
2011 | 2017 | 'agreement_form': form,
|
2012 |
| - 'agreement_message': str(DeveloperAgreementRestriction.error_message), |
2013 | 2018 | }
|
2014 | 2019 | context.update(extra_context)
|
2015 | 2020 | return TemplateResponse(request, template, context=context)
|
|
0 commit comments