Esempio n. 1
0
urlpatterns = decorate(
    write,
    patterns(
        "",
        url("^$", views.index, name="devhub.index"),
        url("", include(redirect_patterns)),
        # Redirect people who have /addons/ instead of /addon/.
        ("^addons/\d+/.*", lambda r: redirect(r.path.replace("addons", "addon", 1))),
        # Add-on submission
        url("^addon/submit/$", lambda r: redirect("devhub.submit.1", permanent=True)),
        url("^addon/submit/1$", views.submit, name="devhub.submit.1"),
        url("^addon/submit/2$", views.submit_addon, name="devhub.submit.2"),
        # Standalone validator:
        url("^addon/validate/?$", views.validate_addon, name="devhub.validate_addon"),
        # Standalone compatibility checker:
        url("^addon/check-compatibility$", views.check_addon_compatibility, name="devhub.check_addon_compatibility"),
        url(
            r"^addon/check-compatibility/application_versions\.json$",
            views.compat_application_versions,
            name="devhub.compat_application_versions",
        ),
        # Redirect to /addons/ at the base.
        url("^addon$", lambda r: redirect("devhub.addons", permanent=True)),
        url("^addons$", views.dashboard, name="devhub.addons"),
        url("^themes$", views.dashboard, name="devhub.themes", kwargs={"theme": True}),
        url("^feed$", views.feed, name="devhub.feed_all"),
        # TODO: not necessary when devhub homepage is moved out of remora
        url("^feed/all$", lambda r: redirect("devhub.feed_all", permanent=True)),
        url("^feed/%s$" % ADDON_ID, views.feed, name="devhub.feed"),
        url("^upload$", views.upload, name="devhub.upload"),
        url("^upload/sideload$", partial(views.upload, is_listed=False), name="devhub.upload_sideload"),
        url("^upload/unlisted$", partial(views.upload, is_listed=False, automated=True), name="devhub.upload_unlisted"),
        url("^upload/([^/]+)(?:/([^/]+))?$", views.upload_detail, name="devhub.upload_detail"),
        url("^standalone-upload$", partial(views.upload, is_standalone=True), name="devhub.standalone_upload"),
        url(
            "^standalone-upload-unlisted$",
            partial(views.upload, is_standalone=True, is_listed=False, automated=True),
            name="devhub.standalone_upload_unlisted",
        ),
        url(
            "^standalone-upload-sideload$",
            partial(views.upload, is_standalone=True, is_listed=False),
            name="devhub.standalone_upload_sideload",
        ),
        url("^standalone-upload/([^/]+)$", views.standalone_upload_detail, name="devhub.standalone_upload_detail"),
        url("^upload-manifest$", views.upload_manifest, name="devhub.upload_manifest"),
        # URLs for a single add-on.
        url("^addon/%s/" % ADDON_ID, include(detail_patterns)),
        url("^ajax/addon/%s/" % ADDON_ID, include(ajax_patterns)),
        # Themes submission.
        url("^theme/submit/?$", views.submit_theme, name="devhub.themes.submit"),
        url("^theme/%s/submit/done$" % ADDON_ID, views.submit_theme_done, name="devhub.themes.submit.done"),
        url(
            "^theme/submit/upload/" "(?P<upload_type>persona_header|persona_footer)$",
            views.ajax_upload_image,
            name="devhub.personas.upload_persona",
        ),
        url("^theme/%s/" % ADDON_ID, include(theme_detail_patterns)),
        # Add-on SDK page
        url("builder$", lambda r: redirect(views.MDN_BASE)),
        # Developer docs
        url("docs/(?P<doc_name>[-_\w]+(?:/[-_\w]+)?)?$", views.docs, name="devhub.docs"),
        # Search
        url(r"^search$", views.search, name="devhub.search"),
    ),
)
Esempio n. 2
0
# These URLs start with /developers/submit/app/<app_slug>/.
submit_apps_patterns = patterns('',
    url('^details/%s$' % amo.APP_SLUG, views.details,
        name='submit.app.details'),
    url('^payments/%s$' % amo.APP_SLUG, views.payments,
        name='submit.app.payments'),
    url('^payments/upsell/%s$' % amo.APP_SLUG, views.payments_upsell,
        name='submit.app.payments.upsell'),
    url('^payments/paypal/%s$' % amo.APP_SLUG, views.payments_paypal,
        name='submit.app.payments.paypal'),
    url('^payments/bounce/%s$' % amo.APP_SLUG, views.payments_bounce,
        name='submit.app.payments.bounce'),
    url('^payments/confirm/%s$' % amo.APP_SLUG, views.payments_confirm,
        name='submit.app.payments.confirm'),
    url('^done/%s$' % amo.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % amo.APP_SLUG, views.resume, name='submit.app.resume'),
)


# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(write, patterns('',
    # App submission.
    url('^$', views.submit, name='submit.app'),
    url('^terms$', views.terms, name='submit.app.terms'),
    url('^choose$', views.choose, name='submit.app.choose'),
    url('^manifest$', views.manifest, name='submit.app.manifest'),
    url('^package$', views.package, name='submit.app.package'),
    ('', include(submit_apps_patterns)),
))
Esempio n. 3
0
settings_patterns = patterns(
    "",
    url("delete$", views.delete, name="account.delete"),
    url("delete_photo$", views.delete_photo, name="account.delete_photo"),
    url("payment(?:/(?P<status>cancel|complete|remove))?$", views.payment, name="account.payment"),
    url("payment/preapproval$", views.preapproval, name="account.payment.preapproval"),
    url("payment/currency$", views.currency, name="account.payment.currency"),
)


# Require authentication.
settings_patterns = decorate(
    login_required,
    patterns(
        "",
        url("^$", views.account_settings, name="account.settings"),
        url("^/feedback$", views.account_feedback, name="account.feedback"),
        ("^/", include(settings_patterns)),
    ),
)

purchases_patterns = decorate(
    login_required,
    patterns(
        "",
        url("^$", views.purchases, name="account.purchases"),
        url(r"^(?P<product_id>\d+)", views.purchases, name="account.purchases.receipt"),
    ),
)

users_patterns = patterns(
Esempio n. 4
0
urlpatterns = decorate(write, patterns('',
    # Redirect people who have /apps/ instead of /app/.
    ('^apps/\d+/.*',
     lambda r: redirect(r.path.replace('apps', 'app', 1))),

    # There's no validator yet, but this is where it will go.
    ## Standalone validator:
    #url('^addon/validate/?$', views.validate_addon,
    #    name='mkt.developers.validate_addon'),

    # Redirect to /addons/ at the base.
    url('^submissions$', use_apps(views.dashboard),
        name='mkt.developers.apps'),
    url('^upload$', views.upload, name='mkt.developers.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='mkt.developers.upload_detail'),
    url('^standalone-upload$', views.standalone_upload,
        name='mkt.developers.standalone_upload'),
    url('^standalone-upload/([^/]+)$', views.standalone_upload_detail,
        name='mkt.developers.standalone_upload_detail'),

    url('^upload-manifest$', views.upload_manifest,
        name='mkt.developers.upload_manifest'),

    # URLs for a single app.
    url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
    url('^ajax/app/%s/' % amo.APP_SLUG, include(ajax_patterns)),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='mkt.developers.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='mkt.developers.docs'),
))
Esempio n. 5
0
settings_patterns = patterns('',
    url('delete$', views.delete, name='account.delete'),
    url('delete_photo$', views.delete_photo,
        name='account.delete_photo'),
    url('payment(?:/(?P<status>cancel|complete|remove))?$', views.payment,
        name='account.payment'),
    url('payment/preapproval$', views.preapproval,
        name='account.payment.preapproval'),
    url('payment/currency$', views.currency,
        name='account.payment.currency'),
)


# Require authentication.
settings_patterns = decorate(login_required, patterns('',
    ('^/', include(settings_patterns)),
)) + patterns('',
    url('^$', views.account_settings, name='account.settings'),
    url('^/feedback$', lambda r: redirect('site.feedback', permanent=True)),
)

purchases_patterns = decorate(login_required, patterns('',
    url(r'^(?P<product_id>\d+)', views.purchases,
        name='account.purchases.receipt'),
)) + patterns('',
    url('^$', views.purchases, name='account.purchases'),
)

users_patterns = patterns('',
    # Keeping the same URL pattern since admin pages already know about this.
    url(r'^(?:(?P<user_id>\d+)/)?edit$', views.admin_edit,
Esempio n. 6
0
urlpatterns = decorate(
    write,
    patterns(
        '',
        # Redirect people who have /apps/ instead of /app/.
        ('^apps/\d+/.*',
         lambda r: redirect(r.path.replace('addons', 'addon', 1))),

        # Standalone validator:
        url('^addon/validate/?$',
            views.validate_addon,
            name='mkt.developers.validate_addon'),

        # Redirect to /addons/ at the base.
        url('^submissions$',
            use_apps(views.dashboard),
            name='mkt.developers.apps'),
        url('^upload$', views.upload, name='mkt.developers.upload'),
        url('^upload/([^/]+)(?:/([^/]+))?$',
            views.upload_detail,
            name='mkt.developers.upload_detail'),
        url('^standalone-upload$',
            views.standalone_upload,
            name='mkt.developers.standalone_upload'),
        url('^standalone-upload/([^/]+)$',
            views.standalone_upload_detail,
            name='mkt.developers.standalone_upload_detail'),
        url('^upload-manifest$',
            views.upload_manifest,
            name='mkt.developers.upload_manifest'),

        # URLs for a single app.
        url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
        url('^ajax/app/%s/' % amo.APP_SLUG, include(ajax_patterns)),

        # Developer docs
        url('docs/(?P<doc_name>[-_\w]+)?$',
            views.docs,
            name='mkt.developers.docs'),
        url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
            views.docs,
            name='mkt.developers.docs'),
    ))
Esempio n. 7
0
    url('delete$', views.delete, name='account.delete'),
    url('delete_photo$', views.delete_photo,
        name='account.delete_photo'),
    url('payment(?:/(?P<status>cancel|complete|remove))?$', views.payment,
        name='account.payment'),
    url('payment/preapproval$', views.preapproval,
        name='account.payment.preapproval'),
    url('payment/currency$', views.currency,
        name='account.payment.currency'),
)


# Require authentication.
settings_patterns = decorate(login_required, patterns('',
    url('^$', views.account_settings, name='account.settings'),
    url('^/about$', views.account_about, name='account.about'),
    ('^/', include(settings_patterns)),
))

purchases_patterns = decorate(login_required, patterns('',
    url('^$', views.purchases, name='account.purchases'),
    url(r'^(?P<product_id>\d+)', views.purchases,
        name='account.purchases.receipt'),
))

users_patterns = patterns('',
    # Keeping the same URL pattern since admin pages already know about this.
    url(r'^(?:(?P<user_id>\d+)/)?edit$', views.admin_edit,
        name='users.admin_edit'),
    url(r'''(?P<username>[^/<>"']+)$''', views.profile,
        name='users.profile'),
Esempio n. 8
0
from mkt.site.decorators import write
from . import views


# These URLs start with /developers/submit/app/<app_slug>/.
submit_apps_patterns = patterns(
    '',
    url('^details/%s$' % mkt.APP_SLUG, views.details,
        name='submit.app.details'),
    url('^done/%s$' % mkt.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % mkt.APP_SLUG, views.resume, name='submit.app.resume'),
)


# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(write, patterns(
    '',
    # Legacy redirects for app submission.
    ('^app', lambda r: redirect('submit.app')),
    # ^ So we can avoid an additional redirect below.
    ('^app/.*', lambda r: redirect(r.path.replace('/developers/app',
                                                  '/developers', 1))),
    ('^manifest$', lambda r: redirect('submit.app', permanent=True)),

    # App submission.
    url('^$', views.submit, name='submit.app'),
    url('^terms$', views.terms, name='submit.app.terms'),

    ('', include(submit_apps_patterns)),
))
Esempio n. 9
0
from django.conf.urls.defaults import patterns, url

from lib.misc.urlconf_decorator import decorate

from amo.decorators import write
from . import views


# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(write, patterns('',
    # Submission.
    #('', include('mkt.submit.urls')),
    # Launchpad.
    url('^$', views.index, name='hub.index'),
))
Esempio n. 10
0
File: urls.py Progetto: vdt/zamboni
    url('delete$', views.delete, name='account.delete'),
    url('delete_photo$', views.delete_photo, name='account.delete_photo'),
    url('payment(?:/(?P<status>cancel|complete|remove))?$',
        views.payment,
        name='account.payment'),
    url('payment/preapproval$',
        views.preapproval,
        name='account.payment.preapproval'),
    url('payment/currency$', views.currency, name='account.payment.currency'),
)

# Require authentication.
settings_patterns = decorate(
    login_required,
    patterns(
        '',
        url('^$', views.account_settings, name='account.settings'),
        ('^/', include(settings_patterns)),
    ))

purchases_patterns = decorate(
    login_required,
    patterns(
        '',
        url('^$', views.purchases, name='account.purchases'),
        url(r'^(?P<product_id>\d+)',
            views.purchases,
            name='account.purchases.receipt'),
    ))

users_patterns = patterns(
Esempio n. 11
0
urlpatterns = decorate(write, patterns(
    '',
    url('^$', views.index, name='devhub.index'),
    url('', include(redirect_patterns)),

    # Redirect people who have /addons/ instead of /addon/.
    ('^addons/\d+/.*',
     lambda r: redirect(r.path.replace('addons', 'addon', 1))),

    # Add-on submission
    url('^addon/submit/$',
        lambda r: redirect('devhub.submit.1', permanent=True)),
    url('^addon/submit/1$', views.submit, name='devhub.submit.1'),
    url('^addon/submit/2$', views.submit_addon, name='devhub.submit.2'),

    # Submission API
    url('^addon/submit/agreement/$', views.api_key_agreement,
        name='devhub.api_key_agreement'),

    url('^addon/api/key/$', views.api_key, name='devhub.api_key'),

    # Standalone validator:
    url('^addon/validate/?$', views.validate_addon,
        name='devhub.validate_addon'),

    # Standalone compatibility checker:
    url('^addon/check-compatibility$', views.check_addon_compatibility,
        name='devhub.check_addon_compatibility'),
    url(r'^addon/check-compatibility/application_versions\.json$',
        views.compat_application_versions,
        name='devhub.compat_application_versions'),

    # Redirect to /addons/ at the base.
    url('^addon$', lambda r: redirect('devhub.addons', permanent=True)),
    url('^addons$', views.dashboard, name='devhub.addons'),
    url('^themes$', views.dashboard, name='devhub.themes',
        kwargs={'theme': True}),
    url('^feed$', views.feed, name='devhub.feed_all'),
    # TODO: not necessary when devhub homepage is moved out of remora
    url('^feed/all$', lambda r: redirect('devhub.feed_all', permanent=True)),
    url('^feed/%s$' % ADDON_ID, views.feed, name='devhub.feed'),

    url('^upload$', views.upload, name='devhub.upload'),
    url('^upload/sideload$', partial(views.upload, is_listed=False),
        name='devhub.upload_sideload'),
    url('^upload/unlisted$',
        partial(views.upload, is_listed=False, automated=True),
        name='devhub.upload_unlisted'),

    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='devhub.upload_detail'),

    url('^standalone-upload$',
        partial(views.upload, is_standalone=True),
        name='devhub.standalone_upload'),
    url('^standalone-upload-unlisted$',
        partial(views.upload, is_standalone=True, is_listed=False,
                automated=True),
        name='devhub.standalone_upload_unlisted'),
    url('^standalone-upload-sideload$',
        partial(views.upload, is_standalone=True, is_listed=False),
        name='devhub.standalone_upload_sideload'),

    url('^standalone-upload/([^/]+)$', views.standalone_upload_detail,
        name='devhub.standalone_upload_detail'),

    # URLs for a single add-on.
    url('^addon/%s/' % ADDON_ID, include(detail_patterns)),

    url('^ajax/addon/%s/' % ADDON_ID, include(ajax_patterns)),

    # Themes submission.
    url('^theme/submit/?$', views.submit_theme, name='devhub.themes.submit'),
    url('^theme/%s/submit/done$' % ADDON_ID, views.submit_theme_done,
        name='devhub.themes.submit.done'),
    url('^theme/submit/upload/'
        '(?P<upload_type>persona_header|persona_footer)$',
        views.ajax_upload_image, name='devhub.personas.upload_persona'),
    url('^theme/%s/' % ADDON_ID, include(theme_detail_patterns)),

    # Add-on SDK page
    url('builder$', lambda r: redirect(views.MDN_BASE)),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+(?:/[-_\w]+)?)?$',
        views.docs, name='devhub.docs'),

    # Search
    url(r'^search$', views.search, name='devhub.search'),
))
Esempio n. 12
0
import mkt
from mkt.site.decorators import use_master
from . import views

# These URLs start with /developers/submit/app/<app_slug>/.
submit_apps_patterns = patterns(
    '',
    url('^details/%s$' % mkt.APP_SLUG,
        views.details,
        name='submit.app.details'),
    url('^done/%s$' % mkt.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % mkt.APP_SLUG, views.resume, name='submit.app.resume'),
)

urlpatterns = decorate(
    use_master,
    patterns(
        '',
        # Legacy redirects for app submission.
        ('^app', lambda r: redirect('submit.app')),
        # ^ So we can avoid an additional redirect below.
        ('^app/.*', lambda r: redirect(
            r.path.replace('/developers/app', '/developers', 1))),
        ('^manifest$', lambda r: redirect('submit.app', permanent=True)),

        # App submission.
        url('^$', views.submit, name='submit.app'),
        url('^terms$', views.terms, name='submit.app.terms'),
        ('', include(submit_apps_patterns)),
    ))
Esempio n. 13
0
urlpatterns = decorate(write, patterns(
    '',
    url('^$', views.index, name='devhub.index'),
    url('', include(redirect_patterns)),

    # Redirect people who have /addons/ instead of /addon/.
    ('^addons/\d+/.*',
     lambda r: redirect(r.path.replace('addons', 'addon', 1))),

    # Add-on submission
    url('^addon/submit/$',
        lambda r: redirect('devhub.submit.1', permanent=True)),
    url('^addon/submit/1$', views.submit, name='devhub.submit.1'),
    url('^addon/submit/2$', views.submit_addon, name='devhub.submit.2'),

    # Submission API
    url('^addon/submit/agreement/$', views.api_key_agreement,
        name='devhub.api_key_agreement'),

    url('^addon/api/key/$', views.api_key, name='devhub.api_key'),

    # Standalone validator:
    url('^addon/validate/?$', views.validate_addon,
        name='devhub.validate_addon'),

    # Standalone compatibility checker:
    url('^addon/check-compatibility$', views.check_addon_compatibility,
        name='devhub.check_addon_compatibility'),
    url(r'^addon/check-compatibility/application_versions\.json$',
        views.compat_application_versions,
        name='devhub.compat_application_versions'),

    # Redirect to /addons/ at the base.
    url('^addon$', lambda r: redirect('devhub.addons', permanent=True)),
    url('^addons$', views.dashboard, name='devhub.addons'),
    url('^themes$', views.dashboard, name='devhub.themes',
        kwargs={'theme': True}),
    url('^feed$', views.feed, name='devhub.feed_all'),
    # TODO: not necessary when devhub homepage is moved out of remora
    url('^feed/all$', lambda r: redirect('devhub.feed_all', permanent=True)),
    url('^feed/%s$' % ADDON_ID, views.feed, name='devhub.feed'),

    url('^upload$', views.upload, name='devhub.upload'),
    url('^upload/sideload$', partial(views.upload, is_listed=False),
        name='devhub.upload_sideload'),
    url('^upload/unlisted$',
        partial(views.upload, is_listed=False, automated=True),
        name='devhub.upload_unlisted'),

    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='devhub.upload_detail'),

    url('^standalone-upload$',
        partial(views.upload, is_standalone=True),
        name='devhub.standalone_upload'),
    url('^standalone-upload-unlisted$',
        partial(views.upload, is_standalone=True, is_listed=False,
                automated=True),
        name='devhub.standalone_upload_unlisted'),
    url('^standalone-upload-sideload$',
        partial(views.upload, is_standalone=True, is_listed=False),
        name='devhub.standalone_upload_sideload'),

    url('^standalone-upload/([^/]+)$', views.standalone_upload_detail,
        name='devhub.standalone_upload_detail'),

    url('^upload-manifest$', views.upload_manifest,
        name='devhub.upload_manifest'),

    # URLs for a single add-on.
    url('^addon/%s/' % ADDON_ID, include(detail_patterns)),

    url('^ajax/addon/%s/' % ADDON_ID, include(ajax_patterns)),

    # Themes submission.
    url('^theme/submit/?$', views.submit_theme, name='devhub.themes.submit'),
    url('^theme/%s/submit/done$' % ADDON_ID, views.submit_theme_done,
        name='devhub.themes.submit.done'),
    url('^theme/submit/upload/'
        '(?P<upload_type>persona_header|persona_footer)$',
        views.ajax_upload_image, name='devhub.personas.upload_persona'),
    url('^theme/%s/' % ADDON_ID, include(theme_detail_patterns)),

    # Add-on SDK page
    url('builder$', lambda r: redirect(views.MDN_BASE)),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+(?:/[-_\w]+)?)?$',
        views.docs, name='devhub.docs'),

    # Search
    url(r'^search$', views.search, name='devhub.search'),
))
Esempio n. 14
0
urlpatterns = decorate(write, patterns('',
    # Redirect people who have /apps/ instead of /app/.
    ('^apps/\d+/.*',
     lambda r: http.HttpResponseRedirect(r.path.replace('apps', 'app', 1))),

    # Standalone validator:
    url('^validator/?$', views.validate_addon,
        name='mkt.developers.validate_addon'),

    # Redirect to /addons/ at the base.
    url('^submissions$', use_apps(views.dashboard),
        name='mkt.developers.apps'),
    url('^upload$', views.upload, name='mkt.developers.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='mkt.developers.upload_detail'),
    url('^standalone-hosted-upload$', views.standalone_hosted_upload,
        name='mkt.developers.standalone_hosted_upload'),
    url('^standalone-packaged-upload$', views.standalone_packaged_upload,
        name='mkt.developers.standalone_packaged_upload'),
    url('^standalone-(hosted|packaged)-upload/([^/]+)$',
        views.standalone_upload_detail,
        name='mkt.developers.standalone_upload_detail'),

    url('^upload-manifest$', views.upload_manifest,
        name='mkt.developers.upload_manifest'),

    # URLs for a single app.
    url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
    url('^ajax/app/%s/' % amo.APP_SLUG, include(ajax_patterns)),

    url('^terms$', views.terms, name='mkt.developers.apps.terms'),
    url(r'^api$', views.api, name='mkt.developers.apps.api'),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='mkt.developers.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='mkt.developers.docs'),
))
Esempio n. 15
0
submit_apps_patterns = patterns('',
    url('^details/%s$' % amo.APP_SLUG, views.details,
        name='submit.app.details'),
    url('^done/%s$' % amo.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % amo.APP_SLUG, views.resume, name='submit.app.resume'),
)


# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(write, patterns('',
    url('^theme$', views.submit_theme, name='submit.theme'),
    url('^theme/upload/'
        '(?P<upload_type>persona_header|persona_footer)$',
        devhub_views.ajax_upload_image, name='submit.theme.upload'),
    url('^theme/%s$' % ADDON_ID, views.submit_theme_done,
        name='submit.theme.done'),

    # Legacy redirects for app submission.
    ('^app', lambda r: redirect('submit.app')),
    # ^ So we can avoid an additional redirect below.
    ('^app/.*', lambda r: redirect(r.path.replace('/developers/app',
                                                  '/developers', 1))),
    ('^manifest$', lambda r: redirect('submit.app', permanent=True)),

    # App submission.
    url('^$', views.submit, name='submit.app'),
    url('^terms$', views.terms, name='submit.app.terms'),

    ('', include(submit_apps_patterns)),
))
Esempio n. 16
0
from lib.misc.urlconf_decorator import decorate
from mkt.account.api import AccountResource, FeedbackResource, InstalledResource, LoginResource
from . import views

settings_patterns = patterns(
    "",
    url("delete$", views.delete, name="account.delete"),
    url("delete_photo$", views.delete_photo, name="account.delete_photo"),
    url("payment(?:/(?P<status>cancel|complete|remove))?$", views.payment, name="account.payment"),
    url("payment/preapproval$", views.preapproval, name="account.payment.preapproval"),
    url("payment/currency$", views.currency, name="account.payment.currency"),
)


# Require authentication.
settings_patterns = decorate(login_required, patterns("", ("^/", include(settings_patterns)))) + patterns(
    "",
    url("^$", views.account_settings, name="account.settings"),
    url("^/feedback$", lambda r: redirect("site.feedback", permanent=True)),
)

purchases_patterns = decorate(
    login_required, patterns("", url(r"^(?P<product_id>\d+)", views.purchases, name="account.purchases.receipt"))
) + patterns("", url("^$", views.purchases, name="account.purchases"))

users_patterns = patterns(
    "",
    # Keeping the same URL pattern since admin pages already know about this.
    url(r"^(?:(?P<user_id>\d+)/)?edit$", views.admin_edit, name="users.admin_edit"),
    url(r"""^(?P<username>[^/<>"']+)$""", views.profile, name="users.profile"),
    url(r"""^(?P<username>[^/<>"']+)/abuse$""", views.abuse, name="users.abuse"),
Esempio n. 17
0
urlpatterns = decorate(write, patterns('',
    url('^$', views.index, name='mkt.developers.index'),

    # Redirect people who have /addons/ instead of /addon/.
    ('^addons/\d+/.*',
     lambda r: redirect(r.path.replace('addons', 'addon', 1))),

    # Standalone validator:
    url('^addon/validate/?$', views.validate_addon,
        name='mkt.developers.validate_addon'),

    # Standalone compatibility checker:
    url('^addon/check-compatibility$', views.check_addon_compatibility,
        name='mkt.developers.check_addon_compatibility'),
    url(r'^addon/check-compatibility/application_versions\.json$',
        views.compat_application_versions,
        name='mkt.developers.compat_application_versions'),

    # Add-on packager
    url('^tools/package/', include(packager_patterns)),

    # Redirect to /addons/ at the base.
    url('^addon$',
        lambda r: redirect('mkt.developers.addons', permanent=True)),
    url('^addons$', views.dashboard, name='mkt.developers.addons'),
    url('^submissions$', use_apps(views.dashboard),
        name='mkt.developers.apps'),
    url('^upload$', views.upload, name='mkt.developers.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='mkt.developers.upload_detail'),
    url('^standalone-upload$', views.standalone_upload,
        name='mkt.developers.standalone_upload'),
    url('^standalone-upload/([^/]+)$', views.standalone_upload_detail,
        name='mkt.developers.standalone_upload_detail'),

    url('^upload-manifest$', views.upload_manifest,
        name='mkt.developers.upload_manifest'),

    # URLs for a single add-on.
    url('^addon/%s/' % ADDON_ID, include(detail_patterns)),
    url('^app/%s/' % APP_SLUG, include(app_detail_patterns)),

    url('^ajax/addon/%s/' % ADDON_ID, include(ajax_patterns)),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='mkt.developers.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='mkt.developers.docs'),
))
Esempio n. 18
0
urlpatterns = decorate(
    write,
    patterns(
        "",
        url("^$", views.index, name="devhub.index"),
        url("", include(redirect_patterns)),
        # Redirect people who have /addons/ instead of /addon/.
        ("^addons/\d+/.*", lambda r: redirect(r.path.replace("addons", "addon", 1))),
        # Add-on submission
        url("^addon/submit/$", lambda r: redirect("devhub.submit.1", permanent=True)),
        url("^addon/submit/1$", views.submit, name="devhub.submit.1"),
        url("^addon/submit/2$", views.submit_addon, name="devhub.submit.2"),
        # Web App submission
        url("^app/submit/$", lambda r: redirect("devhub.submit_apps.1", permanent=True)),
        url("^app/submit/1$", use_apps(views.submit), name="devhub.submit_apps.1"),
        url("^app/submit/2$", use_apps(views.submit_addon), name="devhub.submit_apps.2"),
        # Standalone validator:
        url("^addon/validate/?$", views.validate_addon, name="devhub.validate_addon"),
        # Standalone compatibility checker:
        url("^addon/check-compatibility$", views.check_addon_compatibility, name="devhub.check_addon_compatibility"),
        url(
            r"^addon/check-compatibility/application_versions\.json$",
            views.compat_application_versions,
            name="devhub.compat_application_versions",
        ),
        # Add-on packager
        url("^tools/package/", include(packager_patterns)),
        # Redirect to /addons/ at the base.
        url("^addon$", lambda r: redirect("devhub.addons", permanent=True)),
        url("^addons$", views.dashboard, name="devhub.addons"),
        url("^apps$", use_apps(views.dashboard), name="devhub.apps"),
        url("^feed$", views.feed, name="devhub.feed_all"),
        # TODO: not necessary when devhub homepage is moved out of remora
        url("^feed/all$", lambda r: redirect("devhub.feed_all", permanent=True)),
        url("^feed/%s$" % ADDON_ID, views.feed, name="devhub.feed"),
        url("^upload$", views.upload, name="devhub.upload"),
        url("^upload/([^/]+)(?:/([^/]+))?$", views.upload_detail, name="devhub.upload_detail"),
        url("^standalone-upload$", views.standalone_upload, name="devhub.standalone_upload"),
        url("^standalone-upload/([^/]+)$", views.standalone_upload_detail, name="devhub.standalone_upload_detail"),
        url("^upload-manifest$", views.upload_manifest, name="devhub.upload_manifest"),
        # URLs for a single add-on.
        url("^addon/%s/" % ADDON_ID, include(detail_patterns)),
        url("^app/%s/" % APP_SLUG, include(app_detail_patterns)),
        url("^app/%s/submit/" % ADDON_ID, include(submit_apps_patterns)),
        url("^ajax/addon/%s/" % ADDON_ID, include(ajax_patterns)),
        # Personas submission.
        url("^persona/submit$", views.submit_persona, name="devhub.personas.submit"),
        url("^persona/%s/submit/done$" % ADDON_ID, views.submit_persona_done, name="devhub.personas.submit.done"),
        url(
            "^persona/submit/upload/" "(?P<upload_type>persona_header|persona_footer)$",
            views.ajax_upload_image,
            name="devhub.personas.upload_persona",
        ),
        # Add-on SDK page
        url("builder$", views.builder, name="devhub.builder"),
        # Developer docs
        url("docs/(?P<doc_name>[-_\w]+)?$", views.docs, name="devhub.docs"),
        url("docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)", views.docs, name="devhub.docs"),
        # PayPal Checker
        url("^check_paypal$", views.check_paypal, name="devhub.check_paypal"),
        # Search
        url(r"^search$", views.search, name="devhub.search"),
    ),
)
Esempio n. 19
0
urlpatterns = decorate(write, patterns('',
    url('^$', views.index, name='devhub.index'),
    url('', include(redirect_patterns)),

    # Redirect people who have /addons/ instead of /addon/.
    ('^addons/\d+/.*',
     lambda r: redirect(r.path.replace('addons', 'addon', 1))),

    # Add-on submission
    url('^addon/submit/$',
        lambda r: redirect('devhub.submit.1', permanent=True)),
    url('^addon/submit/1$', views.submit, name='devhub.submit.1'),
    url('^addon/submit/2$', views.submit_addon, name='devhub.submit.2'),

    # Web App submission
    url('^app/submit/$',
        lambda r: redirect('devhub.submit_apps.1', permanent=True)),
    url('^app/submit/1$', views.submit, name='devhub.submit_apps.1'),
    url('^app/submit/2$', views.submit_addon, name='devhub.submit_apps.2'),

    # Standalone validator:
    url('^addon/validate/?$', views.validate_addon,
        name='devhub.validate_addon'),

    # Standalone compatibility checker:
    url('^addon/check-compatibility$', views.check_addon_compatibility,
        name='devhub.check_addon_compatibility'),
    url(r'^addon/check-compatibility/application_versions\.json$',
        views.compat_application_versions,
        name='devhub.compat_application_versions'),

    # Add-on packager
    url('^tools/package/', include(packager_patterns)),

    # Redirect to /addons/ at the base.
    url('^addon$', lambda r: redirect('devhub.addons', permanent=True)),
    url('^addons$', views.dashboard, name='devhub.addons'),
    url('^themes$', views.dashboard, name='devhub.themes',
        kwargs={'theme': True}),
    url('^apps$', views.dashboard, name='devhub.apps'),
    url('^feed$', views.feed, name='devhub.feed_all'),
    # TODO: not necessary when devhub homepage is moved out of remora
    url('^feed/all$', lambda r: redirect('devhub.feed_all', permanent=True)),
    url('^feed/%s$' % ADDON_ID, views.feed, name='devhub.feed'),
    url('^upload$', views.upload, name='devhub.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='devhub.upload_detail'),
    url('^standalone-upload$', views.standalone_upload,
        name='devhub.standalone_upload'),
    url('^standalone-upload/([^/]+)$', views.standalone_upload_detail,
        name='devhub.standalone_upload_detail'),

    url('^upload-manifest$', views.upload_manifest,
        name='devhub.upload_manifest'),

    # URLs for a single add-on.
    url('^addon/%s/' % ADDON_ID, include(detail_patterns)),
    url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
    url('^app/%s/submit/' % ADDON_ID, include(submit_apps_patterns)),

    url('^ajax/addon/%s/' % ADDON_ID, include(ajax_patterns)),

    # Themes submission.
    url('^theme/submit/?$', views.submit_theme, name='devhub.themes.submit'),
    url('^theme/%s/submit/done$' % ADDON_ID, views.submit_theme_done,
        name='devhub.themes.submit.done'),
    url('^theme/submit/upload/'
        '(?P<upload_type>persona_header|persona_footer)$',
        views.ajax_upload_image, name='devhub.personas.upload_persona'),
    url('^theme/%s/' % ADDON_ID, include(theme_detail_patterns)),

    # Add-on SDK page
    url('builder$', views.builder, name='devhub.builder'),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='devhub.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='devhub.docs'),

    # Search
    url(r'^search$', views.search, name='devhub.search'),
))
Esempio n. 20
0
urlpatterns = decorate(
    write,
    patterns(
        "",
        # Redirect people who have /apps/ instead of /app/.
        ("^apps/\d+/.*", lambda r: http.HttpResponseRedirect(r.path.replace("apps", "app", 1))),
        # Redirect to /addons/ at the base.
        url("^submissions$", views.dashboard, name="mkt.developers.apps"),
        url("^upload$", views.upload_new, name="mkt.developers.upload"),
        url("^upload/([^/]+)(?:/([^/]+))?$", views.upload_detail, name="mkt.developers.upload_detail"),
        url(
            "^standalone-hosted-upload$", views.standalone_hosted_upload, name="mkt.developers.standalone_hosted_upload"
        ),
        url(
            "^standalone-packaged-upload$",
            views.standalone_packaged_upload,
            name="mkt.developers.standalone_packaged_upload",
        ),
        url(
            "^standalone-(hosted|packaged)-upload/([^/]+)$",
            views.standalone_upload_detail,
            name="mkt.developers.standalone_upload_detail",
        ),
        # Standalone tools.
        url("^validator/?$", views.validate_app, name="mkt.developers.validate_app"),
        url("^upload-manifest$", views.upload_manifest, name="mkt.developers.upload_manifest"),
        url("^in-app-keys/$", views_payments.in_app_keys, name="mkt.developers.apps.in_app_keys"),
        url(
            "^in-app-key-secret/([^/]+)$",
            views_payments.in_app_key_secret,
            name="mkt.developers.apps.in_app_key_secret",
        ),
        # URLs for a single app.
        url("^app/%s/" % amo.APP_SLUG, include(app_detail_patterns)),
        url("^ajax/app/%s/" % amo.APP_SLUG, include(ajax_patterns)),
        url("^terms$", views.terms, name="mkt.developers.apps.terms"),
        url("^api$", views.api, name="mkt.developers.apps.api"),
        # Set the developer Message of the Day.
        url("^motd$", views.motd, name="mkt.developers.motd"),
        # Developer docs
        url("docs/(?P<doc_name>[-_\w]+)?$", views.docs, name="mkt.developers.docs"),
        url("docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)", views.docs, name="mkt.developers.docs"),
        url("^transactions/", views.transactions, name="mkt.developers.transactions"),
        # Bango-specific stuff.
        url("^provider/", include(provider_patterns("provider"))),
        url("^test/$", views.testing, name="mkt.developers.apps.testing"),
        url("^test/receipts/", include(test_patterns)),
    ),
)
Esempio n. 21
0
urlpatterns = decorate(
    write,
    patterns(
        '',
        url('^$', views.index, name='devhub.index'),
        url('', include(redirect_patterns)),

        # Redirect people who have /addons/ instead of /addon/.
        ('^addons/\d+/.*',
         lambda r: redirect(r.path.replace('addons', 'addon', 1))),

        # Add-on submission
        url('^addon/submit/$',
            lambda r: redirect('devhub.submit.1', permanent=True)),
        url('^addon/submit/1$', views.submit, name='devhub.submit.1'),
        url('^addon/submit/2$', views.submit_addon, name='devhub.submit.2'),

        # Web App submission
        url('^app/submit/$',
            lambda r: redirect('devhub.submit_apps.1', permanent=True)),
        url('^app/submit/1$',
            use_apps(views.submit),
            name='devhub.submit_apps.1'),
        url('^app/submit/2$',
            use_apps(views.submit_addon),
            name='devhub.submit_apps.2'),

        # Standalone validator:
        url('^addon/validate/?$',
            views.validate_addon,
            name='devhub.validate_addon'),

        # Standalone compatibility checker:
        url('^addon/check-compatibility$',
            views.check_addon_compatibility,
            name='devhub.check_addon_compatibility'),
        url(r'^addon/check-compatibility/application_versions\.json$',
            views.compat_application_versions,
            name='devhub.compat_application_versions'),

        # Add-on packager
        url('^tools/package/', include(packager_patterns)),

        # Redirect to /addons/ at the base.
        url('^addon$', lambda r: redirect('devhub.addons', permanent=True)),
        url('^addons$', views.dashboard, name='devhub.addons'),
        url('^themes$',
            views.dashboard,
            name='devhub.themes',
            kwargs={'theme': True}),
        url('^apps$', use_apps(views.dashboard), name='devhub.apps'),
        url('^feed$', views.feed, name='devhub.feed_all'),
        # TODO: not necessary when devhub homepage is moved out of remora
        url('^feed/all$',
            lambda r: redirect('devhub.feed_all', permanent=True)),
        url('^feed/%s$' % ADDON_ID, views.feed, name='devhub.feed'),
        url('^upload$', views.upload, name='devhub.upload'),
        url('^upload/([^/]+)(?:/([^/]+))?$',
            views.upload_detail,
            name='devhub.upload_detail'),
        url('^standalone-upload$',
            views.standalone_upload,
            name='devhub.standalone_upload'),
        url('^standalone-upload/([^/]+)$',
            views.standalone_upload_detail,
            name='devhub.standalone_upload_detail'),
        url('^upload-manifest$',
            views.upload_manifest,
            name='devhub.upload_manifest'),

        # URLs for a single add-on.
        url('^addon/%s/' % ADDON_ID, include(detail_patterns)),
        url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
        url('^app/%s/submit/' % ADDON_ID, include(submit_apps_patterns)),
        url('^ajax/addon/%s/' % ADDON_ID, include(ajax_patterns)),

        # Themes submission.
        url('^theme/submit/?$',
            views.submit_theme,
            name='devhub.themes.submit'),
        url('^theme/%s/submit/done$' % ADDON_ID,
            views.submit_theme_done,
            name='devhub.themes.submit.done'),
        url(
            '^theme/submit/upload/'
            '(?P<upload_type>persona_header|persona_footer)$',
            views.ajax_upload_image,
            name='devhub.personas.upload_persona'),
        url('^theme/%s/' % ADDON_ID, include(theme_detail_patterns)),

        # Add-on SDK page
        url('builder$', views.builder, name='devhub.builder'),

        # Developer docs
        url('docs/(?P<doc_name>[-_\w]+)?$', views.docs, name='devhub.docs'),
        url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
            views.docs,
            name='devhub.docs'),

        # PayPal Checker
        url('^check_paypal$', views.check_paypal, name='devhub.check_paypal'),

        # Search
        url(r'^search$', views.search, name='devhub.search'),
    ))
Esempio n. 22
0
urlpatterns = decorate(
    write,
    patterns(
        "",
        url("^$", views.index, name="mkt.developers.index"),
        # Redirect people who have /addons/ instead of /addon/.
        ("^addons/\d+/.*", lambda r: redirect(r.path.replace("addons", "addon", 1))),
        # Standalone validator:
        url("^addon/validate/?$", views.validate_addon, name="mkt.developers.validate_addon"),
        # Standalone compatibility checker:
        url(
            "^addon/check-compatibility$",
            views.check_addon_compatibility,
            name="mkt.developers.check_addon_compatibility",
        ),
        url(
            r"^addon/check-compatibility/application_versions\.json$",
            views.compat_application_versions,
            name="mkt.developers.compat_application_versions",
        ),
        # Add-on packager
        url("^tools/package/", include(packager_patterns)),
        # Redirect to /addons/ at the base.
        url("^addon$", lambda r: redirect("mkt.developers.addons", permanent=True)),
        url("^addons$", views.dashboard, name="mkt.developers.addons"),
        url("^submissions$", use_apps(views.dashboard), name="mkt.developers.apps"),
        url("^upload$", views.upload, name="mkt.developers.upload"),
        url("^upload/([^/]+)(?:/([^/]+))?$", views.upload_detail, name="mkt.developers.upload_detail"),
        url("^standalone-upload$", views.standalone_upload, name="mkt.developers.standalone_upload"),
        url(
            "^standalone-upload/([^/]+)$",
            views.standalone_upload_detail,
            name="mkt.developers.standalone_upload_detail",
        ),
        url("^upload-manifest$", views.upload_manifest, name="mkt.developers.upload_manifest"),
        # URLs for a single add-on.
        url("^addon/%s/" % ADDON_ID, include(detail_patterns)),
        url("^app/%s/" % APP_SLUG, include(app_detail_patterns)),
        url("^ajax/addon/%s/" % ADDON_ID, include(ajax_patterns)),
        # Developer docs
        url("docs/(?P<doc_name>[-_\w]+)?$", views.docs, name="mkt.developers.docs"),
        url("docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)", views.docs, name="mkt.developers.docs"),
    ),
)
Esempio n. 23
0
from amo.decorators import write
from devhub import views as devhub_views
from . import views


# These URLs start with /developers/submit/app/<app_slug>/.
submit_apps_patterns = patterns('',
    url('^details/%s$' % amo.APP_SLUG, views.details,
        name='submit.app.details'),
    url('^done/%s$' % amo.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % amo.APP_SLUG, views.resume, name='submit.app.resume'),
)


# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(write, patterns('',
    url('^theme$', views.submit_theme, name='submit.theme'),
    url('^theme/upload/'
        '(?P<upload_type>persona_header|persona_footer)$',
        devhub_views.ajax_upload_image, name='submit.theme.upload'),
    url('^theme/%s$' % ADDON_ID, views.submit_theme_done,
        name='submit.theme.done'),

    # App submission.
    url('^app$', views.submit, name='submit.app'),
    url('^app/proceed$', views.proceed, name='submit.app.proceed'),
    url('^app/terms$', views.terms, name='submit.app.terms'),
    url('^app/manifest$', views.manifest, name='submit.app.manifest'),
    ('^app/', include(submit_apps_patterns)),
))
Esempio n. 24
0
urlpatterns = decorate(
    use_master,
    patterns(
        '',
        # Redirect people who have /apps/ instead of /app/.
        ('^apps/\d+/.*',
         lambda r: http.HttpResponseRedirect(r.path.replace('apps', 'app', 1))
         ),

        # Redirect to /addons/ at the base.
        url('^submissions$', views.dashboard, name='mkt.developers.apps'),
        url('^upload$', views.upload_new, name='mkt.developers.upload'),
        url('^upload/([^/]+)(?:/([^/]+))?$',
            views.upload_detail,
            name='mkt.developers.upload_detail'),
        url('^standalone-hosted-upload$',
            views.standalone_hosted_upload,
            name='mkt.developers.standalone_hosted_upload'),
        url('^standalone-packaged-upload$',
            views.standalone_packaged_upload,
            name='mkt.developers.standalone_packaged_upload'),
        url('^standalone-(hosted|packaged)-upload/([^/]+)$',
            views.standalone_upload_detail,
            name='mkt.developers.standalone_upload_detail'),

        # Standalone tools.
        url('^validator/?$',
            views.validate_app,
            name='mkt.developers.validate_app'),
        url('^upload-manifest$',
            views.upload_manifest,
            name='mkt.developers.upload_manifest'),

        # URLs for a single app.
        url('^app/%s/' % mkt.APP_SLUG, include(app_detail_patterns)),
        url('^ajax/app/%s/' % mkt.APP_SLUG, include(ajax_patterns)),
        url('^terms$', views.terms, name='mkt.developers.apps.terms'),
        url('^terms/standalone$',
            views.terms_standalone,
            name='mkt.developers.apps.terms_standalone'),
        url('^api$', views.api, name='mkt.developers.apps.api'),

        # Set the developer Message of the Day.
        url('^motd$', views.motd, name='mkt.developers.motd'),

        # Developer docs
        url('docs/(?P<doc_name>[-_\w]+)?$',
            views.docs,
            name='mkt.developers.docs'),
        url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
            views.docs,
            name='mkt.developers.docs'),
        url('^transactions/',
            views.transactions,
            name='mkt.developers.transactions'),
        url('^test/$', views.testing, name='mkt.developers.apps.testing'),
        url('^test/receipts/', include(test_patterns)),
    ))
Esempio n. 25
0
File: urls.py Progetto: vdt/zamboni
    url('^payments/%s$' % amo.APP_SLUG,
        views.payments,
        name='submit.app.payments'),
    url('^payments/upsell/%s$' % amo.APP_SLUG,
        views.payments_upsell,
        name='submit.app.payments.upsell'),
    url('^payments/paypal/%s$' % amo.APP_SLUG,
        views.payments_paypal,
        name='submit.app.payments.paypal'),
    url('^payments/bounce/%s$' % amo.APP_SLUG,
        views.payments_bounce,
        name='submit.app.payments.bounce'),
    url('^payments/confirm/%s$' % amo.APP_SLUG,
        views.payments_confirm,
        name='submit.app.payments.confirm'),
    url('^done/%s$' % amo.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % amo.APP_SLUG, views.resume, name='submit.app.resume'),
)

# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(
    write,
    patterns(
        '',
        # App submission.
        url('^$', views.submit, name='submit.app'),
        url('^terms$', views.terms, name='submit.app.terms'),
        url('^manifest$', views.manifest, name='submit.app.manifest'),
        ('', include(submit_apps_patterns)),
    ))
Esempio n. 26
0
    url('^details/%s$' % amo.APP_SLUG,
        views.details,
        name='submit.app.details'),
    url('^done/%s$' % amo.APP_SLUG, views.done, name='submit.app.done'),
    url('^resume/%s$' % amo.APP_SLUG, views.resume, name='submit.app.resume'),
)

# Decorate all the views as @write so as to bypass cache.
urlpatterns = decorate(
    write,
    patterns(
        '',
        url('^theme$', views.submit_theme, name='submit.theme'),
        url('^theme/upload/'
            '(?P<upload_type>persona_header|persona_footer)$',
            devhub_views.ajax_upload_image,
            name='submit.theme.upload'),
        url('^theme/%s$' % ADDON_ID,
            views.submit_theme_done,
            name='submit.theme.done'),

        # App submission.
        url('^app$', views.submit, name='submit.app'),
        url('^app/proceed$', views.proceed, name='submit.app.proceed'),
        url('^app/terms$', views.terms, name='submit.app.terms'),
        url('^app/choose$', views.choose, name='submit.app.choose'),
        url('^app/manifest$', views.manifest, name='submit.app.manifest'),
        url('^app/package$', views.package, name='submit.app.package'),
        ('^app/', include(submit_apps_patterns)),
    ))
Esempio n. 27
0
urlpatterns = decorate(write, patterns('',
    # Redirect people who have /apps/ instead of /app/.
    ('^apps/\d+/.*',
     lambda r: http.HttpResponseRedirect(r.path.replace('apps', 'app', 1))),

    # Standalone validator:
    url('^validator/?$', views.validate_addon,
        name='mkt.developers.validate_addon'),

    # Redirect to /addons/ at the base.
    url('^submissions$', use_apps(views.dashboard),
        name='mkt.developers.apps'),
    url('^upload$', views.upload_new, name='mkt.developers.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='mkt.developers.upload_detail'),
    url('^standalone-hosted-upload$', views.standalone_hosted_upload,
        name='mkt.developers.standalone_hosted_upload'),
    url('^standalone-packaged-upload$', views.standalone_packaged_upload,
        name='mkt.developers.standalone_packaged_upload'),
    url('^standalone-(hosted|packaged)-upload/([^/]+)$',
        views.standalone_upload_detail,
        name='mkt.developers.standalone_upload_detail'),

    # Standalone tools.
    url('^upload-manifest$', views.upload_manifest,
        name='mkt.developers.upload_manifest'),
    url('^in-app-keys/$', views_payments.in_app_keys,
        name='mkt.developers.apps.in_app_keys'),
    url('^in-app-key-secret/([^/]+)$', views_payments.in_app_key_secret,
        name='mkt.developers.apps.in_app_key_secret'),

    # URLs for a single app.
    url('^app/%s/' % amo.APP_SLUG, include(app_detail_patterns)),
    url('^ajax/app/%s/' % amo.APP_SLUG, include(ajax_patterns)),

    url('^terms$', views.terms, name='mkt.developers.apps.terms'),
    url('^api$', views.api, name='mkt.developers.apps.api'),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='mkt.developers.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='mkt.developers.docs'),

    url('^statistics/', include(all_apps_stats_patterns)),
    url('^transactions/', views.transactions,
        name='mkt.developers.transactions'),

    # Bango-specific stuff.
    url('^bango/', include(bango_patterns('bango'))),

    url('^test/receipts/', include(test_patterns)),
))
Esempio n. 28
0
urlpatterns = decorate(use_master, patterns(
    '',
    # Redirect people who have /apps/ instead of /app/.
    ('^apps/\d+/.*',
     lambda r: http.HttpResponseRedirect(r.path.replace('apps', 'app', 1))),

    # Redirect to /addons/ at the base.
    url('^submissions$', views.dashboard, name='mkt.developers.apps'),
    url('^upload$', views.upload_new, name='mkt.developers.upload'),
    url('^upload/([^/]+)(?:/([^/]+))?$', views.upload_detail,
        name='mkt.developers.upload_detail'),
    url('^standalone-hosted-upload$', views.standalone_hosted_upload,
        name='mkt.developers.standalone_hosted_upload'),
    url('^standalone-packaged-upload$', views.standalone_packaged_upload,
        name='mkt.developers.standalone_packaged_upload'),
    url('^standalone-(hosted|packaged)-upload/([^/]+)$',
        views.standalone_upload_detail,
        name='mkt.developers.standalone_upload_detail'),

    # Standalone tools.
    url('^validator/?$', views.validate_app,
        name='mkt.developers.validate_app'),
    url('^upload-manifest$', views.upload_manifest,
        name='mkt.developers.upload_manifest'),

    # URLs for a single app.
    url('^app/%s/' % mkt.APP_SLUG, include(app_detail_patterns)),
    url('^ajax/app/%s/' % mkt.APP_SLUG, include(ajax_patterns)),

    url('^terms$', views.terms, name='mkt.developers.apps.terms'),
    url('^terms/standalone$', views.terms_standalone,
        name='mkt.developers.apps.terms_standalone'),
    url('^api$', views.api, name='mkt.developers.apps.api'),

    # Set the developer Message of the Day.
    url('^motd$', views.motd, name='mkt.developers.motd'),

    # Developer docs
    url('docs/(?P<doc_name>[-_\w]+)?$',
        views.docs, name='mkt.developers.docs'),
    url('docs/(?P<doc_name>[-_\w]+)/(?P<doc_page>[-_\w]+)',
        views.docs, name='mkt.developers.docs'),

    url('^transactions/', views.transactions,
        name='mkt.developers.transactions'),

    url('^test/$', views.testing, name='mkt.developers.apps.testing'),
    url('^test/receipts/', include(test_patterns)),
))