Esempio n. 1
0
    url(firstrun_re, mozorg_zhtw_redirect, name='firefox.firstrun'),
    url(whatsnew_re, mozorg_zhtw_redirect, name='firefox.whatsnew'),
    url(tour_re, mozorg_zhtw_redirect, name='firefox.tour'),

    url(r'^firefox/partners/$', views.firefox_partners,
        name='firefox.partners.index'),

    # This dummy page definition makes it possible to link to /firefox/ (Bug 878068)
    url('^firefox/$', views.fx_home_redirect, name='firefox'),


    url(r'^firefox/os/$', direct_to_template, {'template': 'firefox/os/index-new.html'}, name='fxos'),
    url(r'^firefox/os/$', direct_to_template, {'template': 'firefox/os/index-new.html'}, name='firefox.os.index'),
    page('firefox/os/releases', 'firefox/os/releases.html'),

    # firefox/os/notes/ should redirect to the latest version; update this in /redirects/urls.py
    url('^firefox/os/notes/(?P<fx_version>%s)/$' % version_re,
        views.release_notes, {'product': 'Firefox OS'},
        name='firefox.os.releasenotes'),

    page('mwc', 'firefox/os/mwc-2015-preview.html',
        decorators=waffle_switch('mwc-2015-preview')),
    page('firefox/os/devices', 'firefox/os/devices.html'),
    page('firefox/os/devices/tv', 'firefox/os/tv.html'),

    url(releasenotes_re, views.release_notes, name='firefox.releasenotes'),
    url(mobile_releasenotes_re, views.release_notes, name='mobile.releasenotes'),
    url(sysreq_re, views.system_requirements,
        name='firefox.system_requirements'),
)
Esempio n. 2
0
    url('^firefox/dnt/$', views.dnt, name='firefox.dnt'),
    url(firstrun_re, views.FirstrunView.as_view(), name='firefox.firstrun'),
    url(whatsnew_re, views.WhatsnewView.as_view(), name='firefox.whatsnew'),
    url(tour_re, views.TourView.as_view(), name='firefox.tour'),
    url(hello_start_re, views.HelloStartView.as_view(), name='firefox.hello.start'),
    url(r'^firefox/partners/$', views.firefox_partners,
        name='firefox.partners.index'),

    # This dummy page definition makes it possible to link to /firefox/ (Bug 878068)
    url('^firefox/$', views.fx_home_redirect, name='firefox'),

    url('^firefox/os/$', views.firefox_os_index, name='firefox.os.index'),
    page('firefox/os/releases', 'firefox/os/releases.html'),

    page('mwc', 'firefox/os/mwc-2015-preview.html',
        decorators=waffle_switch('mwc-2015-preview')),

    page('firefox/os/devices', 'firefox/os/devices.html'),
    page('firefox/os/devices/tv', 'firefox/os/tv.html',
        decorators=waffle_switch('firefox-os-tv')),

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

    # Release notes
    url('^(?:%s)/(?:%s/)?notes/$' % (product_re, channel_re),
        bedrock.releasenotes.views.latest_notes, name='firefox.notes'),
    url('firefox/latest/releasenotes/$', bedrock.releasenotes.views.latest_notes,
        {'product': 'firefox'}),
    url('^firefox/(?:%s/)?system-requirements/$' % channel_re,
        bedrock.releasenotes.views.latest_sysreq,
        {'product': 'firefox'}, name='firefox.sysreq'),
Esempio n. 3
0
def migration_on(fn):
    return waffle_switch('!fxa-migrated')(fn)
Esempio n. 4
0
from django.conf import settings
from django.conf.urls import url
from django.contrib.auth.views import (LogoutView, PasswordResetView,
                                       PasswordResetDoneView,
                                       PasswordResetConfirmView,
                                       PasswordResetCompleteView)
from waffle.decorators import waffle_switch
from apps.accounts.views.api_profile import my_profile
from apps.accounts.views.core import (create_account, account_settings,
                                      activation_verify)
from apps.accounts.views.login import LoginView, PasswordChangeView

urlpatterns = [
    url(r'^api/profile$', my_profile, name='my_profile_v2'),
    url(r'^logout$',
        waffle_switch('login')(LogoutView.as_view()),
        name='logout_v2'),
    url(r'^create$',
        waffle_switch('signup')(create_account),
        name='accounts_create_account_v2'),
    url(r'^settings$', account_settings, name='account_settings_v2'),
    url(r'^login$|^mfa/login$',
        waffle_switch('login')(LoginView.as_view()),
        name='login_v2'),
    url(r'^password-change$',
        waffle_switch('login')(PasswordChangeView.as_view(
            template_name='registration/passwd_change_form.html',
            success_url='settings')),
        name='password_change_v2'),
    url(r'^expired-password-change$',
        waffle_switch('login')(PasswordChangeView.as_view(
Esempio n. 5
0
    url(whatsnew_re, views.WhatsnewView.as_view(), name='firefox.whatsnew'),
    url(tour_re, views.TourView.as_view(), name='firefox.tour'),
    url(hello_start_re,
        views.HelloStartView.as_view(),
        name='firefox.hello.start'),
    url(r'^firefox/partners/$',
        views.firefox_partners,
        name='firefox.partners.index'),

    # This dummy page definition makes it possible to link to /firefox/ (Bug 878068)
    url('^firefox/$', views.fx_home_redirect, name='firefox'),
    url('^firefox/os/$', views.firefox_os_index, name='firefox.os.index'),
    page('firefox/os/releases', 'firefox/os/releases.html'),
    page('mwc',
         'firefox/os/mwc-2015-preview.html',
         decorators=waffle_switch('mwc-2015-preview')),
    page('firefox/os/devices', 'firefox/os/devices.html'),
    page('firefox/os/devices/tv',
         'firefox/os/tv.html',
         decorators=waffle_switch('firefox-os-tv')),
    page('firefox/independent', 'firefox/independent.html'),

    # Release notes
    url('^(?:%s)/(?:%s/)?notes/$' % (product_re, channel_re),
        bedrock.releasenotes.views.latest_notes,
        name='firefox.notes'),
    url('firefox/latest/releasenotes/$',
        bedrock.releasenotes.views.latest_notes, {'product': 'firefox'}),
    url('^firefox/(?:%s/)?system-requirements/$' % channel_re,
        bedrock.releasenotes.views.latest_sysreq, {'product': 'firefox'},
        name='firefox.sysreq'),
Esempio n. 6
0
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 = (
    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),
    page('firefox/choose', 'firefox/choose.html',
        decorators=waffle_switch('tracking-protection')),
    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'),
    page('firefox/os/faq', 'firefox/os/faq.html'),
    page('firefox/products', 'firefox/family/index.html'),
Esempio n. 7
0
from django.conf.urls import url
from waffle.decorators import waffle_switch
from .views import (
    openid_configuration,
    ApplicationListView,
    ApplicationLabelView,
    PublicApplicationListView,
)


urlpatterns = [
    url(r'^openid-configuration$',
        openid_configuration,
        name='openid-configuration'),
    url(r'^applications$',
        waffle_switch('wellknown_applications')(ApplicationListView.as_view()),
        name='applications-list'),
    url(r'^application-labels$',
        waffle_switch('wellknown_applications')(ApplicationLabelView.as_view()),
        name='application-labels'),
    url(r'^public-applications$',
        waffle_switch('wellknown_applications')(PublicApplicationListView.as_view()),
        name='public-applications-list'),
]
Esempio n. 8
0
    url(tour_re, views.TourView.as_view(), name='firefox.tour'),
    url(hello_start_re, views.HelloStartView.as_view(), name='firefox.hello.start'),
    url(r'^firefox/partners/$', views.firefox_partners,
        name='firefox.partners.index'),

    # This dummy page definition makes it possible to link to /firefox/ (Bug 878068)
    url('^firefox/$', views.fx_home_redirect, name='firefox'),

    page('firefox/os', 'firefox/os/index.html'),
    page('firefox/os/releases', 'firefox/os/releases.html'),


    page('mwc', 'firefox/os/mwc-2014-preview.html'),
    page('firefox/os/devices', 'firefox/os/devices.html'),
    page('firefox/os/devices/tv', 'firefox/os/tv.html',
        decorators=waffle_switch('firefox-os-tv')),

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


    # Release notes
    url('^(?:%s)/(?:%s/)?notes/$' % (product_re, channel_re),
        bedrock.releasenotes.views.latest_notes, name='firefox.notes'),
    url('firefox/latest/releasenotes/$', bedrock.releasenotes.views.latest_notes,
        {'product': 'firefox'}),
    url('^firefox/(?:%s/)?system-requirements/$' % channel_re,
        bedrock.releasenotes.views.latest_sysreq,
        {'product': 'firefox'}, name='firefox.sysreq'),
    url(releasenotes_re, bedrock.releasenotes.views.release_notes, name='firefox.releasenotes'),
    url(mobile_releasenotes_re, bedrock.releasenotes.views.release_notes,
        {'product': 'Firefox for Android'}, name='mobile.releasenotes'),
Esempio n. 9
0
def migration_on(fn):
    return waffle_switch('!fxa-migrated')(fn)