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'),
ajax_patterns = patterns('', url('^image/status$', views.image_status, name='mkt.developers.apps.ajax.image.status'), ) 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( "^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"),