Exemplo n.º 1
0
 def test_locale_redirect_non_exclusion(self, l10n_mock, djrender_mock):
     """A url with a prefix not in SUPPORTED_NONLOCALES should use l10n render."""
     url = page('walter/abides', 'walter/abides.html', donny='ashes')
     url.callback(self.rf.get('/walter/abides/'))
     assert not djrender_mock.called
     l10n_mock.render.assert_called_with(ANY, 'walter/abides.html', {'urlname': 'walter.abides',
                                                                     'donny': 'ashes'})
Exemplo n.º 2
0
 def page(self):
     """The page for this node, which is a RegexURLPattern."""
     if self.template:
         return page(self.full_path, self.template, node_root=self.root,
                     node=self)
     else:
         return None
Exemplo n.º 3
0
 def test_locale_redirect_exclusion(self, l10n_mock, djrender_mock):
     """A url with a prefix in SUPPORTED_NONLOCALES should use normal render."""
     url = page('dude/abides', 'dude/abides.html', donny='alive')
     url.callback(self.rf.get('/dude/abides/'))
     assert not l10n_mock.render.called
     djrender_mock.assert_called_with(ANY, 'dude/abides.html', {'urlname': 'dude.abides',
                                                                'donny': 'alive'})
Exemplo n.º 4
0
 def test_locale_redirect_exclusion_nested(self, l10n_mock, djrender_mock):
     """The final URL is what should be tested against the setting."""
     url = page('abides', 'abides.html', donny='alive')
     url.callback(self.rf.get('/dude/abides/'))
     assert not l10n_mock.render.called
     djrender_mock.assert_called_with(ANY, 'abides.html', {'urlname': 'abides',
                                                           'donny': 'alive'})
Exemplo n.º 5
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf import settings
from django.conf.urls.defaults import include, patterns
from django.http import HttpResponse

from bedrock.mozorg.util import page


def mock_view(request):
    return HttpResponse('test')


urlpatterns = patterns(
    '',
    (r'', include('%s.urls' % settings.PROJECT_MODULE)),

    # Used by test_helper
    page('base', 'base-resp.html'),
)
Exemplo n.º 6
0
Arquivo: urls.py Projeto: pmac/bedrock
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace('firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')


urlpatterns = (
    redirect(r'^firefox/$', 'firefox.new', name='firefox', locale_prefix=False),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.all_downloads, name='firefox.all'),
    page('firefox/accounts', 'firefox/accounts.html'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html'),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    page('firefox/interest-dashboard', 'firefox/interest-dashboard.html'),
    page('firefox/android', 'firefox/android/index.html'),
    page('firefox/android/faq', 'firefox/android/faq.html'),
    page('firefox/ios', 'firefox/ios.html'),
Exemplo n.º 7
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls.defaults import *
from bedrock.mozorg.util import page


urlpatterns = patterns('',
    page('trans-block-reload-test', 'trans_block_reload_test.html'),
    page('active-de-lang-file', 'active_de_lang_file.html'),
    page('inactive-de-lang-file', 'inactive_de_lang_file.html'),
    page('some-lang-files', 'some_lang_files.html'),
)
Exemplo n.º 8
0

latest_re = r'^firefox(?:/(%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')

releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
mobile_releasenotes_re = releasenotes_re.replace('firefox', 'mobile')
sysreq_re = latest_re % (version_re, 'system-requirements')


urlpatterns = patterns('',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/all/$', views.all_downloads, name='firefox.all'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/geolocation', 'firefox/geolocation.html',
         gmap_api_key=settings.GMAP_API_KEY),
    url(r'^firefox/hello/$', views.hello, name='firefox.hello'),
    page('firefox/happy', 'firefox/happy.html'),
    url('^(?P<product>(firefox|mobile))/((?P<channel>(aurora|beta))/)?notes/$',
        views.latest_notes, name='firefox.latest.notes'),
    url('^firefox/system-requirements',
        views.latest_sysreq, name='firefox.latest.sysreq'),
    page('firefox/memory', 'firefox/memory.html'),
    # page('firefox/faq', 'firefox/faq.html'),
    redirect('firefox/faq', 'https://support.mozilla.org/products/firefox'),
    redirect('^firefox/mobile/platforms/$', 'https://support.mozilla.org/kb/will-firefox-work-my-mobile-device',
             name='firefox.mobile.platforms'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
Exemplo n.º 9
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.privacy import views

urlpatterns = (
    url(r'^/$', views.privacy, name='privacy'),
    page('/principles', 'privacy/principles.html'),
    url(r'^/firefox/$', views.firefox_notices, name='privacy.notices.firefox'),
    url(r'^/firefox-os/$', views.firefox_os_notices, name='privacy.notices.firefox-os'),
    url(r'^/firefox-cloud/$', views.firefox_cloud_notices, name='privacy.notices.firefox-cloud'),
    url(r'^/firefox-hello/$', views.firefox_hello_notices, name='privacy.notices.firefox-hello'),
    url(r'^/firefox-focus/$', views.firefox_focus_notices, name='privacy.notices.firefox-focus'),
    url(r'^/thunderbird/$', views.thunderbird_notices, name='privacy.notices.thunderbird'),
    url(r'^/websites/$', views.websites_notices, name='privacy.notices.websites'),
    url(r'^/facebook/$', views.facebook_notices, name='privacy.notices.facebook'),

    page('/archive', 'privacy/archive/index.html'),
    page('/archive/firefox/2006-10', 'privacy/archive/firefox-2006-10.html'),
    page('/archive/firefox/2008-06', 'privacy/archive/firefox-2008-06.html'),
    page('/archive/firefox/2009-01', 'privacy/archive/firefox-2009-01.html'),
    page('/archive/firefox/2009-09', 'privacy/archive/firefox-2009-09.html'),
    page('/archive/firefox/2010-01', 'privacy/archive/firefox-2010-01.html'),
    page('/archive/firefox/2010-12', 'privacy/archive/firefox-2010-12.html'),
    page('/archive/firefox/2011-06', 'privacy/archive/firefox-2011-06.html'),
    page('/archive/firefox/2012-06', 'privacy/archive/firefox-2012-06.html'),
    page('/archive/firefox/2012-09', 'privacy/archive/firefox-2012-09.html'),
Exemplo n.º 10
0
latest_re = r"^firefox(?:/(?P<fx_version>%s))?/%s/$"
firstrun_re = latest_re % (version_re, "firstrun")
whatsnew_re = latest_re % (version_re, "whatsnew")
tour_re = latest_re % (version_re, "tour")
product_re = "(?P<product>firefox|mobile)"
channel_re = "(?P<channel>beta|aurora|organizations)"
releasenotes_re = latest_re % (version_re, r"(aurora|release)notes")
mobile_releasenotes_re = releasenotes_re.replace("firefox", "mobile")
sysreq_re = latest_re % (version_re, "system-requirements")


urlpatterns = patterns(
    "",
    redirect(r"^firefox/$", "firefox.new", name="firefox"),
    url(r"^firefox/(?:%s/)?all/$" % channel_re, views.all_downloads, name="firefox.all"),
    page("firefox/channel", "firefox/channel.html"),
    redirect("^firefox/channel/android/$", "firefox.channel"),
    page("firefox/desktop", "firefox/desktop/index.html"),
    page("firefox/desktop/fast", "firefox/desktop/fast.html"),
    page("firefox/desktop/customize", "firefox/desktop/customize.html"),
    page("firefox/desktop/tips", "firefox/desktop/tips.html"),
    page("firefox/desktop/trust", "firefox/desktop/trust.html"),
    page("firefox/geolocation", "firefox/geolocation.html"),
    url("^(?:%s)/(?:%s/)?notes/$" % (product_re, channel_re), views.latest_notes, name="firefox.notes"),
    url("^firefox/latest/releasenotes/$", views.latest_notes),
    url("^firefox/(?:%s/)?system-requirements/$" % channel_re, views.latest_sysreq, name="firefox.sysreq"),
    page("firefox/android", "firefox/android/index.html"),
    page("firefox/android/faq", "firefox/android/faq.html"),
    page("firefox/os/faq", "firefox/os/faq.html"),
    url("^firefox/sms/$", views.sms_send, name="firefox.sms"),
    page("firefox/sms/sent", "firefox/android/sms-thankyou.html"),
Exemplo n.º 11
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from bedrock.redirects.util import redirect
from bedrock.mozorg.util import page

urlpatterns = (
    # There will eventually be a main education landing page
    # but we'll redirect until then.
    redirect(r'^teach/$', 'teach.smarton.security', name='teach'),

    # There will eventually be a main SmartOn landing page
    # but we'll redirect until then.
    redirect(r'^teach/smarton/$',
             'teach.smarton.security',
             name='teach.smarton'),

    # SmartOn
    page('teach/smarton/tracking', 'teach/smarton/tracking.html'),
    page('teach/smarton/security', 'teach/smarton/security.html'),
)
Exemplo n.º 12
0
from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.security.views import (
    AdvisoriesView,
    AdvisoryView,
    KVRedirectsView,
    OldAdvisoriesListView,
    OldAdvisoriesView,
    ProductView,
    ProductVersionView,
)

urlpatterns = (
    page('', 'security/index.html'),
    page('bug-bounty', 'security/bug-bounty.html'),
    page('client-bug-bounty', 'security/client-bug-bounty.html'),
    page('web-bug-bounty', 'security/web-bug-bounty.html'),
    page('bug-bounty/faq', 'security/bug-bounty/faq.html'),
    page('bug-bounty/faq-webapp', 'security/bug-bounty/faq-webapp.html'),
    page('bug-bounty/hall-of-fame', 'security/bug-bounty/hall-of-fame.html'),
    page('bug-bounty/web-eligible-sites',
         'security/bug-bounty/web-eligible-sites.html'),
    page('bug-bounty/web-hall-of-fame',
         'security/bug-bounty/web-hall-of-fame.html'),
    url(r'^advisories/$', AdvisoriesView.as_view(),
        name='security.advisories'),
    url(r'^advisories/mfsa(?P<pk>\d{4}-\d{2,3})/$',
        AdvisoryView.as_view(),
        name='security.advisory'),
Exemplo n.º 13
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls.defaults import *

from commonware.decorators import xframe_allow

from bedrock.facebookapps import views
from bedrock.facebookapps.decorators import extract_app_data, facebook_locale
from bedrock.mozorg.util import page

urlpatterns = patterns(
    '',
    url(r'^tab_redirect/$',
        views.tab_redirect,
        name='facebookapps.tab_redirect'),
    url(r'^tab_redirect/(?P<redirect_type>[a-z]*)/$',
        views.tab_redirect,
        name='facebookapps.tab_redirect'),
    page('channel', 'facebookapps/channel.html'),
    page('downloadtab',
         'facebookapps/downloadtab.html',
         decorators=(xframe_allow, extract_app_data, facebook_locale)),
    page('downloadtab/noscroll',
         'facebookapps/downloadtab.html',
         decorators=(xframe_allow, extract_app_data, facebook_locale),
         noscroll=True),
)
Exemplo n.º 14
0
    '',  # noqa
    # view.existing allows a user who has a link including their token to
    # subscribe, unsubscribe, change their preferences. Each newsletter
    # includes that link for them.
    url('^newsletter/existing/(?P<token>[^/]*)/?$',
        views.existing,
        name='newsletter.existing.token'),

    # After submitting on the `existing` page, users end up on the
    # `updated` page.  There are optional query params; see the view.
    url('^newsletter/updated/$', views.updated, name='newsletter.updated'),

    # Confirm subscriptions
    url('^newsletter/confirm/(?P<token>' + uuid_regex + ')/$',
        views.confirm,
        name='newsletter.confirm'),

    # Request recovery message with link to manage subscriptions
    url('^newsletter/recovery/', views.recovery, name='newsletter.recovery'),

    # This particular view is used inside a frame somewhere else, so it
    # has its own view and doesn't work like the rest of these newsletter
    # signup pages.
    url('^newsletter/hacks\.mozilla\.org/$',
        views.hacks_newsletter,
        name='mozorg.hacks_newsletter'),

    # Page to subscribe to 'mozilla-and-you' newsletter
    page('newsletter', 'newsletter/mozilla-and-you.html'),
)
Exemplo n.º 15
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.privacy import views

urlpatterns = (
    url(r'^/$', views.privacy, name='privacy'),
    page('/principles', 'privacy/principles.html'),
    page('/faq', 'privacy/faq.html'),
    url(r'^/firefox/$', views.firefox_notices, name='privacy.notices.firefox'),
    url(r'^/firefox-os/$',
        views.firefox_os_notices,
        name='privacy.notices.firefox-os'),
    url(r'^/firefox-cliqz/$',
        views.firefox_cliqz_notices,
        name='privacy.notices.firefox-cliqz'),
    url(r'^/firefox-fire-tv/$',
        views.firefox_fire_tv_notices,
        name='privacy.notices.firefox-fire-tv'),
    url(r'^/firefox-focus/$',
        views.firefox_focus_notices,
        name='privacy.notices.firefox-focus'),
    url(r'^/firefox-rocket/$',
        views.firefox_rocket_notices,
        name='privacy.notices.firefox-rocket'),
    # bug 1319207 - special URL for Firefox Focus in de locale
    url(r'^/firefox-klar/$',
Exemplo n.º 16
0
Arquivo: urls.py Projeto: xfq/bedrock
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.privacy import views

urlpatterns = (
    url(r'^/$', views.privacy, name='privacy'),
    page('/principles', 'privacy/principles.html'),
    url(r'^/firefox/$', views.firefox_notices, name='privacy.notices.firefox'),
    url(r'^/firefox-os/$', views.firefox_os_notices, name='privacy.notices.firefox-os'),
    url(r'^/firefox-cloud/$', views.firefox_cloud_notices, name='privacy.notices.firefox-cloud'),
    url(r'^/firefox-hello/$', views.firefox_hello_notices, name='privacy.notices.firefox-hello'),
    url(r'^/thunderbird/$', views.thunderbird_notices, name='privacy.notices.thunderbird'),
    url(r'^/websites/$', views.websites_notices, name='privacy.notices.websites'),
    url(r'^/facebook/$', views.facebook_notices, name='privacy.notices.facebook'),

    page('/archive', 'privacy/archive/index.html'),
    page('/archive/firefox/2006-10', 'privacy/archive/firefox-2006-10.html'),
    page('/archive/firefox/2008-06', 'privacy/archive/firefox-2008-06.html'),
    page('/archive/firefox/2009-01', 'privacy/archive/firefox-2009-01.html'),
    page('/archive/firefox/2009-09', 'privacy/archive/firefox-2009-09.html'),
    page('/archive/firefox/2010-01', 'privacy/archive/firefox-2010-01.html'),
    page('/archive/firefox/2010-12', 'privacy/archive/firefox-2010-12.html'),
    page('/archive/firefox/2011-06', 'privacy/archive/firefox-2011-06.html'),
    page('/archive/firefox/2012-06', 'privacy/archive/firefox-2012-06.html'),
    page('/archive/firefox/2012-09', 'privacy/archive/firefox-2012-09.html'),
    page('/archive/firefox/2012-12', 'privacy/archive/firefox-2012-12.html'),
Exemplo n.º 17
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.releasenotes import version_re
from bedrock.exp import views

latest_re = r'^firefox(?:/(?P<version>%s))?/%s/$'
whatsnew_re_all = latest_re % (version_re, 'whatsnew/all')

urlpatterns = (
    page('opt-out', 'exp/opt-out.html'),
    page('firefox',
         'exp/firefox/index.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    page('firefox/new',
         'exp/firefox/new/download.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    page('firefox/new/nav', 'exp/firefox/new/download-nav.html'),
    page('firefox/accounts', 'exp/firefox/accounts-2019.html'),
    page('firefox/lockwise',
         'exp/firefox/lockwise.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    page('firefox',
         'exp/firefox/index.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    page('firefox/welcome/1', 'exp/firefox/welcome/page1.html'),
    url(whatsnew_re_all,
Exemplo n.º 18
0
from django.conf.urls import patterns, url

from bedrock.mozorg.util import page
from bedrock.security.views import (
    AdvisoriesView,
    AdvisoryView,
    KVRedirectsView,
    OldAdvisoriesListView,
    OldAdvisoriesView,
    ProductView,
    ProductVersionView,
)


urlpatterns = patterns('',  # noqa
    page('', 'security/index.html'),
    page('bug-bounty', 'security/bug-bounty.html'),
    page('bug-bounty-faq', 'security/bug-bounty-faq.html'),
    page('bug-bounty-faq-webapp', 'security/bug-bounty-faq-webapp.html'),
    url(r'^advisories/$',
        AdvisoriesView.as_view(), name='security.advisories'),
    url(r'^advisories/mfsa(?P<pk>\d{4}-\d{2,3})/$',
        AdvisoryView.as_view(), name='security.advisory'),

    page('known-vulnerabilities', 'security/known-vulnerabilities.html'),
    page('known-vulnerabilities/older-vulnerabilities', 'security/older-vulnerabilities.html'),
    url(r'^known-vulnerabilities/(?P<slug>[a-z-]+)/$',
        ProductView.as_view(), name='security.product-advisories'),
    url(r'^known-vulnerabilities/(?P<product>[\w-]+)-(?P<version>\d{1,3}(\.\d{1,3})?)/$',
        ProductVersionView.as_view(), name='security.product-version-advisories'),
    url(r'^known-vulnerabilities/(?P<filename>.*)\.html$', KVRedirectsView.as_view()),
Exemplo n.º 19
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import patterns, url
from bedrock.redirects.util import redirect
from bedrock.mozorg.util import page

import views


urlpatterns = patterns('',
    url(r'^$', views.grants, name='grants'),
    url(r'^(?P<slug>[\w-]+).html$', views.grant_info, name='grant_info'),
    page('reports/gnome-haeger-report', 'grants/reports/gnome-haeger-report.html'),
    page('reports/ushahidi-chile-report', 'grants/reports/ushahidi-chile-report.html'),
    redirect(r'.*/$', 'grants'),
)
Exemplo n.º 20
0
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
hello_start_re = latest_re % (version_re, 'hello/start')
product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|developer|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
mobile_releasenotes_re = releasenotes_re.replace('firefox', 'mobile')
sysreq_re = latest_re % (version_re, 'system-requirements')

urlpatterns = patterns(
    '',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads,
        name='firefox.all'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html'),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    url(r'^firefox/hello/$', views.hello, name='firefox.hello'),
    page('firefox/interest-dashboard', 'firefox/interest-dashboard.html'),
    page('firefox/android', 'firefox/android/index.html'),
    page('firefox/android/faq', 'firefox/android/faq.html'),
    page('firefox/os/faq', 'firefox/os/faq.html'),
    page('firefox/products', 'firefox/family/index.html'),
    url('^firefox/sms/$', views.sms_send, name='firefox.sms'),
Exemplo n.º 21
0
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace('firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')


urlpatterns = (
    url(r'^firefox/$', views.FirefoxHubView.as_view(), name='firefox'),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.all_downloads, name='firefox.all'),
    page('firefox/accounts', 'firefox/accounts.html'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    page('firefox/developer', 'firefox/developer/index.html'),
    page('firefox/features', 'firefox/features/index.html'),
    url('^firefox/features/bookmarks/$',
        views.FeaturesBookmarksView.as_view(),
        name='firefox.features.bookmarks'),
    url('^firefox/features/fast/$',
        views.FeaturesFastView.as_view(),
        name='firefox.features.fast'),
    url('^firefox/features/independent/$',
        views.FeaturesIndependentView.as_view(),
        name='firefox.features.independent'),
    url('^firefox/features/memory/$',
Exemplo n.º 22
0
from bedrock.releasenotes import version_re
from bedrock.mozorg.util import page


latest_re = r'^thunderbird(?:/(?P<version>%s))?/%s/$'
thunderbird_releasenotes_re = latest_re % (version_re, r'releasenotes')
sysreq_re = latest_re % (version_re, 'system-requirements')


urlpatterns = patterns('',
    url('^thunderbird/releases/$', bedrock.releasenotes.views.releases_index,
        {'product': 'Thunderbird'}, name='thunderbird.releases.index'),

    url(thunderbird_releasenotes_re, bedrock.releasenotes.views.release_notes,
        {'product': 'Thunderbird'}, name='thunderbird.releasenotes'),

    url(sysreq_re, bedrock.releasenotes.views.system_requirements,
        {'product': 'Thunderbird'}, name='thunderbird.system_requirements'),

    url('^thunderbird/latest/system-requirements/$',
        bedrock.releasenotes.views.latest_sysreq,
        {'product': 'thunderbird', 'channel': 'release'}, name='thunderbird.sysreq'),

    url('^thunderbird/latest/releasenotes/$',
        bedrock.releasenotes.views.latest_notes,
        {'product': 'thunderbird'}),

    # Start pages by channel
    page('thunderbird/release/start', 'thunderbird/start/release.html'),
)
Exemplo n.º 23
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from bedrock.mozorg.util import page

urlpatterns = (
    page('privacy-policy', 'persona/privacy-policy.html'),
    page('terms-of-service', 'persona/terms-of-service.html'),
)
Exemplo n.º 24
0
    url('^newsletter/confirm/(?P<token>%s)/$' % uuid_regex,
        views.confirm,
        name='newsletter.confirm'),

    # Update country
    url('^newsletter/country/(?P<token>%s)/$' % uuid_regex,
        views.set_country,
        name='newsletter.country'),

    # Request recovery message with link to manage subscriptions
    url('^newsletter/recovery/',
        views.recovery,
        name='newsletter.recovery'),

    # Receives POSTs from all subscribe forms
    url('^newsletter/$',
        views.newsletter_subscribe,
        name='newsletter.subscribe'),

    # Welcome program out-out confirmation page (bug 1442129)
    url('^newsletter/opt-out-confirmation/',
        views.recovery,
        name='newsletter.opt-out-confirmation'),

    # Branded signup pages for individual newsletters
    page('newsletter/mozilla', 'newsletter/mozilla.html'),
    page('newsletter/firefox', 'newsletter/firefox.html'),
    page('newsletter/developer', 'newsletter/developer.html'),
    page('newsletter/country/success', 'newsletter/country_success.html'),
)
Exemplo n.º 25
0
Arquivo: urls.py Projeto: gerv/bedrock
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace('firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')


urlpatterns = (
    url(r'^firefox/$', views.FirefoxHubView.as_view(), name='firefox'),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.all_downloads, name='firefox.all'),
    page('firefox/accounts', 'firefox/accounts.html'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    url(r'^firefox/desktop/$',
        views.FirefoxProductDesktopView.as_view(),
        name='firefox.desktop.index'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html', alt_canonical_paths={
        'en-US': '/firefox/features/fast/',
    }),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    url(r'firefox/features/$', views.features_landing, name='firefox.features'),
    url('^firefox/features/private-browsing/$',
Exemplo n.º 26
0
 def test_locale_redirect_works_home_page(self, l10n_mock, djrender_mock):
     """Make sure the home page still works. "/" is a special case."""
     url = page('', 'index.html')
     url.callback(self.rf.get('/'))
     ok_(not djrender_mock.called)
     l10n_mock.render.assert_called_with(ANY, 'index.html', {'urlname': 'index'})
Exemplo n.º 27
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.
from django.conf.urls import url
from bedrock.mozorg.util import page

import views


urlpatterns = (
    page('firefox/retention/thank-you-a', 'etc/firefox/retention/thank-you-a.html'),
    page('firefox/retention/thank-you-b', 'etc/firefox/retention/thank-you-b.html'),
    url(r'^firefox/retention/thank-you-referral/$',
        views.ThankyouView.as_view(),
        name='firefox.retention.thank-you-referral'),
)
Exemplo n.º 28
0
 def test_url_name_set_from_template(self, l10n_mock, djrender_mock):
     """If not provided the URL pattern name should be set from the template path."""
     url = page('lebowski/urban_achievers', 'lebowski/achievers.html')
     eq_(url.name, 'lebowski.achievers')
Exemplo n.º 29
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.legal import views

from bedrock.legal_docs.views import LegalDocView

urlpatterns = (
    page('', 'legal/index.html'),

    page('eula', 'legal/eula.html'),
    page('eula/firefox-2', 'legal/eula/firefox-2-eula.html'),
    page('eula/firefox-3', 'legal/eula/firefox-3-eula.html'),
    page('eula/thunderbird-1.5', 'legal/eula/thunderbird-1.5-eula.html'),
    page('eula/thunderbird-2', 'legal/eula/thunderbird-2-eula.html'),
    page('firefox', 'legal/firefox.html'),

    url(r'^terms/mozilla/$', LegalDocView.as_view(template_name='legal/terms/mozilla.html', legal_doc_name='Websites_ToU'),
        name='legal.terms.mozilla'),

    url(r'^terms/firefox/$', LegalDocView.as_view(template_name='legal/terms/firefox.html', legal_doc_name='firefox_about_rights'),
        name='legal.terms.firefox'),

    url(r'^terms/thunderbird/$', LegalDocView.as_view(template_name='legal/terms/thunderbird.html', legal_doc_name='thunderbird_about_rights'),
        name='legal.terms.thunderbird'),

    url(r'^terms/services/$', LegalDocView.as_view(template_name='legal/terms/services.html', legal_doc_name='firefox_cloud_services_ToS'),
Exemplo n.º 30
0
 def test_url_name_set_from_param(self, l10n_mock, djrender_mock):
     """If provided the URL pattern name should be set from the parameter."""
     url = page('lebowski/urban_achievers', 'lebowski/achievers.html',
                url_name='proud.we.are.of.all.of.them')
     eq_(url.name, 'proud.we.are.of.all.of.them')
Exemplo n.º 31
0
    one_newsletter_subscribe, one_newsletter_unsubscribe, google_form, subscription_count, workshop, \
    year_review_2013, year_review_2014, subscribe_embed, newsletter, community, google_form_2014, firefox_family, \
    system_requirements, latest_sysreq
from bedrock.redirects.util import redirect
from bedrock.sandstone.settings import BLOG_URL
from django.views.generic.simple import direct_to_template, redirect_to


product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|nightly|organizations)'
sysreq_re = r'^firefox/(?P<version>(%s|[a-z]+))/system-requirements/$' % version_re

urlpatterns = patterns(
    '',
    # page('firefox/desktop/taiwan', 'mocotw/firefox-desktop.html'),
    page('news', 'mocotw/news.html'),
    page('about/manifesto', 'mocotw/about/manifesto.html'),
    page('about/space', 'mocotw/about/space.html'),
    page('about/careers', 'mocotw/about/careers.html'),
    page('about/contact', 'mocotw/about/contact.html'),
    page('community/student', 'mocotw/community/student/index.html'),
    page('community/student/rules', 'mocotw/community/student/rules.html'),
    page('community/student/intro', 'mocotw/community/student/intro.html'),
    page('community/student/mission', 'mocotw/community/student/mission.html'),
    page('community/student/package', 'mocotw/community/student/package.html'),
    page('community/student/welcome-letter', 'mocotw/emails/welcome_fsa.html'),
    page('myfirefox/edm-2014-01', 'mocotw/myfirefox/edm-2014-01.html'),
    page('myfirefox/edm-2014-04', 'mocotw/myfirefox/edm-2014-04.html'),
    page('firefoxflicks', 'firefoxflicks/list.html'),
    # page('firefox/download', 'firefox/download.html'),
    # page('firefox/ueip', 'firefox/ueip.html'),
Exemplo n.º 32
0
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace('firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')


urlpatterns = (
    url(r'^firefox/$', views.firefox_home, name='firefox'),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.all_downloads, name='firefox.all'),
    url(r'^firefox/accounts/', views.firefox_accounts, name='firefox.accounts'),
    url(r'^firefox/campaign/$', views.campaign, name='firefox.campaign'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    url(r'^firefox/concerts/', views.firefox_concerts, name='firefox.concerts'),
    page('firefox/developer', 'firefox/developer/index.html'),
    url('firefox/election', views.election_with_cards, name='firefox.election'),
    page('firefox/enterprise', 'firefox/enterprise/index.html'),
    page('firefox/enterprise/signup', 'firefox/enterprise/signup.html'),
    page('firefox/enterprise/signup/thanks', 'firefox/enterprise/signup-thanks.html'),
    page('firefox/facebookcontainer', 'firefox/facebookcontainer/index.html'),
    page('firefox/fights-for-you', 'firefox/fights-for-you.html', active_locales=['en-US', 'de', 'fr']),
    page('firefox/features', 'firefox/features/index.html'),
    url('^firefox/features/bookmarks/$',
        views.FeaturesBookmarksView.as_view(),
        name='firefox.features.bookmarks'),
    url('^firefox/features/fast/$',
Exemplo n.º 33
0
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')

urlpatterns = (
    redirect(r'^firefox/$', 'firefox.new', name='firefox',
             locale_prefix=False),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads,
        name='firefox.all'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$',
             'firefox.channel',
             locale_prefix=False),
    url(r'^firefox/choose/$', views.choose, name='firefox.choose'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html'),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    url(r'^firefox/hello/$', views.hello, name='firefox.hello'),
    page('firefox/interest-dashboard', 'firefox/interest-dashboard.html'),
    url(r'^firefox/android/$', views.android, name='firefox.android.index'),
    page('firefox/android/all', 'firefox/android/all.html'),
Exemplo n.º 34
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import patterns, url

from bedrock.mozorg.util import page
from bedrock.legal import views

from bedrock.legal_docs.views import LegalDocView

urlpatterns = patterns('',
    page('', 'legal/index.html'),

    page('eula', 'legal/eula.html'),
    page('eula/firefox-2', 'legal/eula/firefox-2-eula.html'),
    page('eula/firefox-3', 'legal/eula/firefox-3-eula.html'),

    page('firefox', 'legal/firefox.html'),

    url(r'^terms/mozilla/$', LegalDocView.as_view(template_name='legal/terms/mozilla.html', legal_doc_name='Websites_ToU'),
        name='legal.terms.mozilla'),

    url(r'^terms/firefox/$', LegalDocView.as_view(template_name='legal/terms/firefox.html', legal_doc_name='firefox_about_rights'),
        name='legal.terms.firefox'),

    url(r'^terms/firefox-hello/$', LegalDocView.as_view(template_name='legal/terms/firefox-hello.html', legal_doc_name='WebRTC_ToS'),
        name='legal.terms.firefox-hello'),

    url(r'^terms/thunderbird/$', LegalDocView.as_view(template_name='legal/terms/thunderbird.html', legal_doc_name='thunderbird_about_rights'),
        name='legal.terms.thunderbird'),
Exemplo n.º 35
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import patterns
from bedrock.mozorg.util import page

urlpatterns = patterns('',
    page('', 'l10n_example/example.html'),
)
Exemplo n.º 36
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import url

from bedrock.mozorg.util import page
from bedrock.releasenotes import version_re
from bedrock.exp import views

latest_re = r'^firefox(?:/(?P<version>%s))?/%s/$'
whatsnew_re_all = latest_re % (version_re, 'whatsnew/all')

urlpatterns = (
    page('opt-out', 'exp/opt-out.html'),
    page('firefox',
         'exp/firefox/index.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    url(r'^firefox/new/$', views.new, name='exp.firefox.new'),
    page('firefox',
         'exp/firefox/index.html',
         active_locales=['en-US', 'en-GB', 'en-CA', 'de']),
    page('firefox/mobile', 'exp/firefox/mobile.html'),
    url(r'^$', views.home_view, name='exp.mozorg.home'),
)
Exemplo n.º 37
0
    # After submitting on the `existing` page, users end up on the
    # `updated` page.  There are optional query params; see the view.
    url('^newsletter/updated/$',
        views.updated,
        name='newsletter.updated'),

    # Confirm subscriptions
    url('^newsletter/confirm/(?P<token>' + uuid_regex + ')/$',
        views.confirm,
        name='newsletter.confirm'),

    # Request recovery message with link to manage subscriptions
    url('^newsletter/recovery/',
        views.recovery,
        name='newsletter.recovery'),

    # This particular view is used inside a frame somewhere else, so it
    # has its own view and doesn't work like the rest of these newsletter
    # signup pages.
    url('^newsletter/hacks\.mozilla\.org/$',
        views.hacks_newsletter,
        name='mozorg.hacks_newsletter'),

    # Receives POSTs from all subscribe forms
    url('^newsletter/$',
        views.newsletter_subscribe,
        name='newsletter.subscribe'),

    page('newsletter/mozilla', 'newsletter/mozilla.html'),
)
Exemplo n.º 38
0
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace(r'firefox',
                                                  'firefox/android')
ios_releasenotes_re = releasenotes_re.replace(r'firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/ios')

urlpatterns = (
    url(r'^firefox/$', views.firefox_home, name='firefox'),
    url(r'^firefox/all/$', views.firefox_all, name='firefox.all'),
    url(r'^firefox/accounts/$',
        views.firefox_accounts,
        name='firefox.accounts'),
    page('firefox/browsers', 'firefox/browsers/index.html'),
    page('firefox/products', 'firefox/products/index.html'),
    url(r'^firefox/campaign/$', views.campaign, name='firefox.campaign'),
    page('firefox/flashback',
         'firefox/flashback/index.html',
         active_locales=['en-US', 'de', 'fr']),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    page('firefox/developer', 'firefox/developer/index.html'),
    url('firefox/election/$',
        views.election_with_cards,
        name='firefox.election'),
    page('firefox/enterprise', 'firefox/enterprise/index.html'),
    page('firefox/enterprise/signup', 'firefox/enterprise/signup.html'),
    page('firefox/enterprise/signup/thanks',
Exemplo n.º 39
0
            PageNode('Color Palette', path='color', template='styleguide/products/firefox-os/color.html'),
            PageNode('Typeface', path='typeface', template='styleguide/products/firefox-os/typeface.html'),
            PageNode('Headers', path='headers', template='styleguide/products/firefox-os/headers.html'),
            PageNode('Backgrounds', path='backgrounds', template='styleguide/products/firefox-os/backgrounds.html'),
            PageNode('Lists', path='lists', template='styleguide/products/firefox-os/lists.html'),
            PageNode('Buttons', path='buttons', template='styleguide/products/firefox-os/buttons.html'),
            PageNode('Tab Bars', path='tab-bars', template='styleguide/products/firefox-os/tab-bars.html'),
            PageNode('Input Areas', path='input-areas', template='styleguide/products/firefox-os/input-areas.html'),
            PageNode('Switches', path='switches', template='styleguide/products/firefox-os/switches.html'),
            PageNode('Action Icons', path='actionicons', template='styleguide/products/firefox-os/action-icons.html'),
            PageNode('App Icons', path='icons', template='styleguide/products/firefox-os/icons.html'),
        )),
    )),
]

if settings.DEV:
    all_children.extend((
        PageNode('All Buttons', path='all-download-buttons',
                 template='styleguide/websites/sandstone-all-download-buttons.html'),
        PageNode('Docs', path='docs', children=(
            PageNode('Mozilla Pager JS', path='mozilla-pager',
                    template='styleguide/docs/mozilla-pager.html'),
            PageNode('Mozilla Accordion JS', path='mozilla-accordion',
                    template='styleguide/docs/mozilla-accordion.html'),
        )),
    ))

urlpatterns = PageRoot('Home', children=tuple(all_children)).as_urlpatterns()

urlpatterns += [page('identity/mozilla/logo-prototype', 'styleguide/identity/logo-prototype.html')]
Exemplo n.º 40
0
whatsnew_re_all = latest_re % (version_re, 'whatsnew/all')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace(r'firefox',
                                                  'firefox/android')
ios_releasenotes_re = releasenotes_re.replace(r'firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/ios')

urlpatterns = (
    url(r'^firefox/$', views.FirefoxHomeView.as_view(), name='firefox'),
    url(r'^firefox/all/$', views.firefox_all, name='firefox.all'),
    page('firefox/accounts',
         'firefox/accounts.html',
         ftl_files=['firefox/accounts']),
    page('firefox/browsers',
         'firefox/browsers/index.html',
         ftl_files=['firefox/browsers']),
    page('firefox/products',
         'firefox/products/index.html',
         ftl_files=['firefox/products']),
    page('firefox/campaign', 'firefox/campaign/index.html'),
    page('firefox/flashback',
         'firefox/flashback/index.html',
         active_locales=['en-US', 'de', 'fr']),
    page('firefox/channel/desktop',
         'firefox/channel/desktop.html',
         ftl_files=['firefox/channel']),
    page('firefox/channel/android',
Exemplo n.º 41
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls import patterns, url

from bedrock.mozorg.util import page
from bedrock.legal import views

urlpatterns = patterns('',
    page('eula', 'legal/eula.html'),
    page('eula/firefox-2', 'legal/eula/firefox-2-eula.html'),
    page('eula/firefox-3', 'legal/eula/firefox-3-eula.html'),
    page('firefox', 'legal/firefox.html'),
    url('^fraud-report/$', views.fraud_report, name='legal.fraud-report'),
)
Exemplo n.º 42
0
android_releasenotes_re = releasenotes_re.replace(r'firefox',
                                                  'firefox/android')
ios_releasenotes_re = releasenotes_re.replace(r'firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/ios')

urlpatterns = (
    url(r'^firefox/$', views.firefox_home, name='firefox'),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.firefox_all,
        name='firefox.all'),
    url(r'^firefox/accounts/', views.firefox_accounts,
        name='firefox.accounts'),
    url(r'^firefox/campaign/$', views.campaign, name='firefox.campaign'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    url(r'^firefox/concerts/', views.firefox_concerts,
        name='firefox.concerts'),
    page('firefox/developer', 'firefox/developer/index.html'),
    url('firefox/election', views.election_with_cards,
        name='firefox.election'),
    page('firefox/enterprise', 'firefox/enterprise/index.html'),
    page('firefox/enterprise/signup', 'firefox/enterprise/signup.html'),
    page('firefox/enterprise/signup/thanks',
         'firefox/enterprise/signup-thanks.html'),
    page('firefox/facebookcontainer', 'firefox/facebookcontainer/index.html'),
    page('firefox/fights-for-you',
         'firefox/fights-for-you.html',
         active_locales=['en-US', 'de', 'fr']),
Exemplo n.º 43
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls.defaults import *
from bedrock.mozorg.util import page

urlpatterns = patterns('',
    page('demo', 'collusion/demo.html'),
    page('', 'collusion/collusion.html'),
)
Exemplo n.º 44
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from bedrock.mozorg.util import page

urlpatterns = (
    page('', 'lightbeam/lightbeam.html'),
    page('about', 'lightbeam/about.html'),
)
Exemplo n.º 45
0
from django.conf.urls import *
from bedrock.firefox import version_re
from bedrock.mozorg.util import page
from bedrock.mozorg.views import contribute, partnerships
from bedrock.mozorg.views import plugincheck
from bedrock.mocotw.views import issue, one_newsletter_subscribe, one_newsletter_unsubscribe, google_form, subscription_count, workshop
from bedrock.redirects.util import redirect
from bedrock.sandstone.settings import BLOG_URL
from django.views.generic.simple import direct_to_template, redirect_to

sysreq_re = r'^firefox/(?P<version>%s)/system-requirements/$' % version_re

urlpatterns = patterns(
    '',
    page('news', 'mocotw/news.html'),
    # page('about', 'mocotw/about/index.html'),
    page('about/manifesto', 'mocotw/about/manifesto.html'),
    page('about/space', 'mocotw/about/space.html'),
    page('about/careers', 'mocotw/about/careers.html'),
    page('about/intern', 'mocotw/about/intern.html'),
    page('about/contact', 'mocotw/about/contact.html'),
    page('firefoxflicks', 'firefoxflicks/list.html'),
    page('firefox/download', 'firefox/download.html'),
    page('firefox/ueip', 'firefox/ueip.html'),
    page('firefox/mobile/sync', 'firefox/mobile/sync.html'),
    page('firefox/phishing-protection', 'firefox/phishing-protection.html'),
    page('newsletter', 'newsletter/index.html'),
    page('sumo', 'mocotw/sumo.html'),
    page('products', 'mozorg/products.html'),
    page('about/mozilla-based', 'mozorg/projects/mozilla-based.html'),
Exemplo n.º 46
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls.defaults import *
from bedrock.mozorg.util import page

urlpatterns = patterns(
    '',
    page('', 'persona/persona.html'),
    page('about', 'persona/about.html'),
    page('privacy-policy', 'persona/privacy-policy.html'),
    page('terms-of-service', 'persona/terms-of-service.html'),
)
Exemplo n.º 47
0
latest_re = r'^firefox(?:/(%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')

# firstrun testing
# allow any (or no) string for version number
# currently want to restrict to 21.0 only, but
# left here for possible future use
# remove when firstrun experiment is over
#latest_new_re = r'^firefox(?:/(%s))?/firstrun/(?P<view>[a|b])(?P<version>[1-6])/$'
#firstrun_new_re = latest_new_re % version_re


urlpatterns = patterns('',
    url(r'^firefox/all/$', views.all_downloads, name='firefox.all'),
    page('firefox/central', 'firefox/central.html'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/customize', 'firefox/customize.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/fx', 'firefox/fx.html'),
    page('firefox/geolocation', 'firefox/geolocation.html',
         gmap_api_key=settings.GMAP_API_KEY),
    page('firefox/happy', 'firefox/happy.html'),
    page('firefox/memory', 'firefox/memory.html'),
    url('^firefox/mobile/platforms/$', views.platforms,
        name='firefox.mobile.platforms'),
    page('firefox/mobile/features', 'firefox/mobile/features.html'),
    page('firefox/mobile/faq', 'firefox/mobile/faq.html'),
    url('^firefox/sms/$', views.sms_send, name='firefox.sms'),
    page('firefox/sms/sent', 'firefox/mobile/sms-thankyou.html'),
Exemplo n.º 48
0
latest_re = r'^firefox(?:/(%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')

# firstrun testing
# allow any (or no) string for version number
# currently want to restrict to 21.0 only, but
# left here for possible future use
# remove when firstrun experiment is over
#latest_new_re = r'^firefox(?:/(%s))?/firstrun/(?P<view>[a|b])(?P<version>[1-6])/$'
#firstrun_new_re = latest_new_re % version_re

urlpatterns = patterns(
    '',
    url(r'^firefox/all/$', views.all_downloads, name='firefox.all'),
    page('firefox/central', 'firefox/central.html'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/customize', 'firefox/customize.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/fx', 'firefox/fx.html'),
    page('firefox/geolocation',
         'firefox/geolocation.html',
         gmap_api_key=settings.GMAP_API_KEY),
    page('firefox/happy', 'firefox/happy.html'),
    page('firefox/memory', 'firefox/memory.html'),
    url('^firefox/mobile/platforms/$',
        views.platforms,
        name='firefox.mobile.platforms'),
    page('firefox/mobile/features', 'firefox/mobile/features.html'),
    page('firefox/mobile/faq', 'firefox/mobile/faq.html'),
Exemplo n.º 49
0
from bedrock.firefox import version_re
from bedrock.redirects.util import redirect
from bedrock.mozorg.util import page
import views


latest_re = r'^firefox(?:/(%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')


urlpatterns = patterns('',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/all/$', views.all_downloads, name='firefox.all'),
    page('firefox/central', 'firefox/central.html'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/customize', 'firefox/customize.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/fx', 'firefox/fx.html'),
    page('firefox/geolocation', 'firefox/geolocation.html',
         gmap_api_key=settings.GMAP_API_KEY),
    page('firefox/happy', 'firefox/happy.html'),
    url('^(?P<product>(firefox|mobile))/((?P<channel>(aurora|beta))/)?notes/$',
        views.latest_notes, name='firefox.latest.notes'),
    url('^firefox/system-requirements',
        views.latest_sysreq, name='firefox.latest.sysreq'),
    page('firefox/memory', 'firefox/memory.html'),
    page('firefox/mobile/features', 'firefox/mobile/features.html'),
    page('firefox/mobile/faq', 'firefox/mobile/faq.html'),
Exemplo n.º 50
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at https://mozilla.org/MPL/2.0/.

from django.urls import path

from bedrock.mozorg.util import page
from bedrock.privacy import views
from bedrock.redirects.util import redirect

urlpatterns = (
    path("", views.privacy, name="privacy"),
    page("principles", "privacy/principles.html", ftl_files=["privacy/principles", "privacy/index"]),
    page("faq", "privacy/faq.html", ftl_files=["privacy/faq", "privacy/index"]),
    page("email", "privacy/email.html", active_locales=["en-US", "de", "fr"]),
    path("betterweb/", views.firefox_betterweb_notices, name="privacy.notices.firefox-betterweb"),
    path("firefox/", views.firefox_notices, name="privacy.notices.firefox"),
    path("firefox-os/", views.firefox_os_notices, name="privacy.notices.firefox-os"),
    path("firefox-fire-tv/", views.firefox_fire_tv_notices, name="privacy.notices.firefox-fire-tv"),
    path("firefox-focus/", views.firefox_focus_notices, name="privacy.notices.firefox-focus"),
    path("firefox-reality/", views.firefox_reality_notices, name="privacy.notices.firefox-reality"),
    redirect(r"^firefox-rocket/$", "privacy.notices.firefox-lite", locale_prefix=False),
    path("firefox-lite/", views.firefox_lite_notices, name="privacy.notices.firefox-lite"),
    # bug 1319207 - special URL for Firefox Focus in de locale
    path("firefox-klar/", views.firefox_focus_notices, name="privacy.notices.firefox-klar"),
    path("thunderbird/", views.thunderbird_notices, name="privacy.notices.thunderbird"),
    path("websites/", views.websites_notices, name="privacy.notices.websites"),
    path("facebook/", views.facebook_notices, name="privacy.notices.facebook"),
    path("firefox-monitor/", views.firefox_monitor_notices, name="privacy.notices.firefox-monitor"),
    path("firefox-private-network/", views.firefox_private_network, name="privacy.notices.firefox-private-network"),
    path("firefox-relay/", views.firefox_relay_notices, name="privacy.notices.firefox-relay"),
Exemplo n.º 51
0
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
hello_start_re = latest_re % (version_re, 'hello/start')
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android)'
channel_re = '(?P<channel>beta|aurora|developer|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
sysreq_re = latest_re % (version_re, 'system-requirements')


urlpatterns = patterns('',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads, name='firefox.all'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/personal', 'firefox/personal.html'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html'),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    url(r'^firefox/hello/$', views.hello, name='firefox.hello'),
    page('firefox/interest-dashboard', 'firefox/interest-dashboard.html'),
    url(r'^firefox/android/$', views.android, name='firefox.android.index'),
    page('firefox/android/all', 'firefox/android/all.html'),
    page('firefox/android/faq', 'firefox/android/faq.html'),
    page('firefox/ios', 'firefox/ios.html'),
Exemplo n.º 52
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from bedrock.mozorg.util import page
from bedrock.redirects.util import redirect

urlpatterns = (
    page('', 'foundation/index.html'),
    page('about', 'foundation/about.html'),

    # Bug 1224565  /foundation/annualreport/2014/
    redirect(r'^annualreport/$',
             'foundation.annualreport.2014.index',
             name='foundation.annualreport',
             locale_prefix=False),

    # Older annual report financial faqs - these are linked from blog posts
    # was e.g.: http://www.mozilla.org/foundation/documents/mozilla-2008-financial-faq.html
    page('documents/mozilla-2006-financial-faq',
         'foundation/documents/mozilla-2006-financial-faq.html'),
    page('documents/mozilla-2007-financial-faq',
         'foundation/documents/mozilla-2007-financial-faq.html'),
    page('documents/mozilla-2008-financial-faq',
         'foundation/documents/mozilla-2008-financial-faq.html'),

    # ported from PHP in Bug 960689
    page('documents/bylaws-amendment-1',
         'foundation/documents/bylaws-amendment-1.html'),
    page('documents/bylaws-amendment-2',
         'foundation/documents/bylaws-amendment-2.html'),
Exemplo n.º 53
0
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from bedrock.mozorg.util import page
from bedrock.redirects.util import redirect


urlpatterns = (

    # Issue 6478 /foundation/annualreport/2017/
    redirect(r'^annualreport/$', 'foundation.annualreport.2017.index',
             name='foundation.annualreport', locale_prefix=False),

    # Older annual report financial faqs - these are linked from blog posts
    # was e.g.: http://www.mozilla.org/foundation/documents/mozilla-2008-financial-faq.html
    page('documents/mozilla-2006-financial-faq', 'foundation/documents/mozilla-2006-financial-faq.html'),
    page('documents/mozilla-2007-financial-faq', 'foundation/documents/mozilla-2007-financial-faq.html'),
    page('documents/mozilla-2008-financial-faq', 'foundation/documents/mozilla-2008-financial-faq.html'),

    # ported from PHP in Bug 960689
    page('documents/bylaws-amendment-1', 'foundation/documents/bylaws-amendment-1.html'),
    page('documents/bylaws-amendment-2', 'foundation/documents/bylaws-amendment-2.html'),
    page('documents/articles-of-incorporation', 'foundation/documents/articles-of-incorporation.html'),
    page('documents/articles-of-incorporation/amendment', 'foundation/documents/articles-of-incorporation-amendment.html'),
    page('documents/bylaws', 'foundation/documents/bylaws.html'),

    # was https://www.mozilla.org/foundation/annualreport/2009/
    page('annualreport/2009', 'foundation/annualreport/2009/index.html'),
    # was .html
    page('annualreport/2009/a-competitive-world', 'foundation/annualreport/2009/a-competitive-world.html'),
    # was .html
Exemplo n.º 54
0
        name='newsletter.existing.token'),

    # After submitting on the `existing` page, users end up on the
    # `updated` page.  There are optional query params; see the view.
    url('^newsletter/updated/$', views.updated, name='newsletter.updated'),

    # Confirm subscriptions
    url('^newsletter/confirm/(?P<token>' + uuid_regex + ')/$',
        views.confirm,
        name='newsletter.confirm'),

    # Request recovery message with link to manage subscriptions
    url('^newsletter/recovery/', views.recovery, name='newsletter.recovery'),

    # This particular view is used inside a frame somewhere else, so it
    # has its own view and doesn't work like the rest of these newsletter
    # signup pages.
    url('^newsletter/hacks\.mozilla\.org/$',
        views.hacks_newsletter,
        name='mozorg.hacks_newsletter'),

    # Receives POSTs from all subscribe forms
    url('^newsletter/$',
        views.newsletter_subscribe,
        name='newsletter.subscribe'),

    # Branded signup pages for individual newsletters
    page('newsletter/mozilla', 'newsletter/mozilla.html'),
    page('newsletter/firefox', 'newsletter/firefox.html'),
)
Exemplo n.º 55
0
latest_re = r'^firefox(?:/(?P<fx_version>%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|organizations)'
releasenotes_re = latest_re % (version_re, 'releasenotes')
sysreq_re = latest_re % (version_re, 'releasenotes/system-requirements')


urlpatterns = patterns('',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads, name='firefox.all'),
    page('firefox/central', 'firefox/central.html'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/customize', 'firefox/customize.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/fx', 'firefox/fx.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    page('firefox/happy', 'firefox/happy.html'),
    url('^(?:%s)/(?:%s/)?notes/$' % (product_re, channel_re),
        views.latest_notes, name='firefox.notes'),
    url('^firefox/latest/releasenotes/$', views.latest_notes),
    url('^firefox/(?:%s/)?system-requirements/$' % channel_re,
        views.latest_sysreq, name='firefox.sysreq'),
    page('firefox/memory', 'firefox/memory.html'),
    page('firefox/mobile/features', 'firefox/mobile/features.html'),
    page('firefox/mobile/faq', 'firefox/mobile/faq.html'),
Exemplo n.º 56
0
latest_re = r'^firefox(?:/(?P<fx_version>%s))?/%s/$'
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|organizations)'
releasenotes_re = latest_re % (version_re, 'releasenotes')
sysreq_re = latest_re % (version_re, 'releasenotes/system-requirements')

urlpatterns = patterns(
    '',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads,
        name='firefox.all'),
    page('firefox/central', 'firefox/central.html'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/customize', 'firefox/customize.html'),
    page('firefox/features', 'firefox/features.html'),
    page('firefox/fx', 'firefox/fx.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    page('firefox/happy', 'firefox/happy.html'),
    url('^(?:%s)/(?:%s/)?notes/$' % (product_re, channel_re),
        views.latest_notes,
        name='firefox.notes'),
    url('^firefox/latest/releasenotes/$', views.latest_notes),
    url('^firefox/(?:%s/)?system-requirements/$' % channel_re,
        views.latest_sysreq,
        name='firefox.sysreq'),
    page('firefox/memory', 'firefox/memory.html'),
Exemplo n.º 57
0
tracking_protection_re = latest_re % (version_re, 'tracking-protection/start')
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace('firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace('firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace('firefox', 'firefox/ios')


urlpatterns = (
    url(r'^firefox/$', views.FirefoxHubView.as_view(), name='firefox'),
    url(r'^firefox/(?:%s/)?(?:%s/)?all/$' % (platform_re, channel_re),
        views.all_downloads, name='firefox.all'),
    page('firefox/accounts', 'firefox/accounts.html'),
    url('^firefox/accounts/features/$',
        VariationTemplateView.as_view(
            template_name='firefox/accounts-features.html',
            template_context_variations=['a', 'b']),
            name='firefox.accounts-features'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    page('firefox/developer', 'firefox/developer/index.html'),
    page('firefox/enterprise', 'firefox/enterprise/index.html'),
    page('firefox/enterprise/signup', 'firefox/enterprise/signup.html'),
    page('firefox/enterprise/signup/thanks', 'firefox/enterprise/signup-thanks.html'),
    page('firefox/facebookcontainer', 'firefox/facebookcontainer/index.html'),
    page('firefox/features', 'firefox/features/index.html'),
    url('^firefox/features/bookmarks/$',
Exemplo n.º 58
0
# This Source Code Form is subject to the terms of the Mozilla Public
# License, v. 2.0. If a copy of the MPL was not distributed with this
# file, You can obtain one at http://mozilla.org/MPL/2.0/.

from django.conf.urls.defaults import *
from bedrock.redirects.util import redirect
from bedrock.mozorg.util import page

import views


urlpatterns = patterns('',
    url(r'^$', views.grants, name='grants'),
    url(r'^(?P<slug>[\w-]+).html$', views.grant_info, name='grant_info'),
    page('reports/gnome-haeger-report', 'grants/reports/gnome-haeger-report.html'),
    page('reports/ushahidi-chile-report', 'grants/reports/ushahidi-chile-report.html'),
    redirect(r'.*/$', 'grants'),
)
Exemplo n.º 59
0
firstrun_re = latest_re % (version_re, 'firstrun')
whatsnew_re = latest_re % (version_re, 'whatsnew')
tour_re = latest_re % (version_re, 'tour')
hello_start_re = latest_re % (version_re, 'hello/start')
product_re = '(?P<product>firefox|mobile)'
channel_re = '(?P<channel>beta|aurora|developer|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
mobile_releasenotes_re = releasenotes_re.replace('firefox', 'mobile')
sysreq_re = latest_re % (version_re, 'system-requirements')


urlpatterns = patterns('',
    redirect(r'^firefox/$', 'firefox.new', name='firefox'),
    url(r'^firefox/(?:%s/)?all/$' % channel_re,
        views.all_downloads, name='firefox.all'),
    page('firefox/channel', 'firefox/channel.html'),
    redirect('^firefox/channel/android/$', 'firefox.channel'),
    page('firefox/desktop', 'firefox/desktop/index.html'),
    page('firefox/desktop/fast', 'firefox/desktop/fast.html'),
    page('firefox/desktop/customize', 'firefox/desktop/customize.html'),
    page('firefox/desktop/tips', 'firefox/desktop/tips.html'),
    page('firefox/desktop/trust', 'firefox/desktop/trust.html'),
    page('firefox/developer', 'firefox/developer.html'),
    page('firefox/geolocation', 'firefox/geolocation.html'),
    url(r'^firefox/hello/$', views.hello, name='firefox.hello'),
    page('firefox/interest-dashboard', 'firefox/interest-dashboard.html'),
    page('firefox/android', 'firefox/android/index.html'),
    page('firefox/android/faq', 'firefox/android/faq.html'),
    page('firefox/os/faq', 'firefox/os/faq.html'),
    page('firefox/products', 'firefox/family/index.html'),
    url('^firefox/sms/$', views.sms_send, name='firefox.sms'),
Exemplo n.º 60
0
platform_re = '(?P<platform>android|ios)'
channel_re = '(?P<channel>beta|aurora|developer|nightly|organizations)'
releasenotes_re = latest_re % (version_re, r'(aurora|release)notes')
android_releasenotes_re = releasenotes_re.replace(r'firefox', 'firefox/android')
ios_releasenotes_re = releasenotes_re.replace(r'firefox', 'firefox/ios')
sysreq_re = latest_re % (version_re, 'system-requirements')
android_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/android')
ios_sysreq_re = sysreq_re.replace(r'firefox', 'firefox/ios')


urlpatterns = (
    url(r'^firefox/$', views.firefox_home, name='firefox'),
    url(r'^firefox/all/$', views.firefox_all, name='firefox.all'),
    url(r'^firefox/accounts/$', views.firefox_accounts, name='firefox.accounts'),
    url(r'^firefox/campaign/$', views.campaign, name='firefox.campaign'),
    page('firefox/channel/desktop', 'firefox/channel/desktop.html'),
    page('firefox/channel/android', 'firefox/channel/android.html'),
    page('firefox/channel/ios', 'firefox/channel/ios.html'),
    url(r'^firefox/concerts/$', views.firefox_concerts, name='firefox.concerts'),
    page('firefox/developer', 'firefox/developer/index.html'),
    url('firefox/election/$', views.election_with_cards, name='firefox.election'),
    page('firefox/enterprise', 'firefox/enterprise/index.html'),
    page('firefox/enterprise/signup', 'firefox/enterprise/signup.html'),
    page('firefox/enterprise/signup/thanks', 'firefox/enterprise/signup-thanks.html'),
    page('firefox/facebookcontainer', 'firefox/facebookcontainer/index.html'),
    page('firefox/features', 'firefox/features/index.html'),
    url('^firefox/features/bookmarks/$',
        views.FeaturesBookmarksView.as_view(),
        name='firefox.features.bookmarks'),
    url('^firefox/features/fast/$',
        views.FeaturesFastView.as_view(),