Exemplo n.º 1
0
    url('^purchase/$', views.purchase, name='addons.purchase'),
    url(r'purchase/start$', views.paypal_start,
        name='addons.purchase.start'),
    url('^purchase/thanks/$', views.purchase_thanks,
        name='addons.purchase.thanks'),
    url('^purchase/error/$', views.purchase_error,
        name='addons.purchase.error'),
    url('^purchase/(?P<status>cancel|complete)$',
        views.purchase_complete, name='addons.purchase.finished'),

    url('^about$', lambda r, addon_id: redirect('addons.installed',
                                                 addon_id, permanent=True),
                   name='addons.about'),

    ('^reviews/', include(review_patterns('addons'))),
    ('^statistics/', include(stats_patterns)),
    ('^versions/', include('versions.urls')),
)


urlpatterns = patterns('',
    # Promo modules for the homepage
    url('^i/promos$', views.homepage_promos, name='addons.homepage_promos'),

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

    # Accept extra junk at the end for a cache-busting build id.
    url('^addons/buttons.js(?:/.+)?$', 'addons.buttons.js'),
Exemplo n.º 2
0
        name='addons.roadblock'),
    url('^contribute/installed/',
        views.developers, {'page': 'installed'},
        name='addons.installed'),
    url('^contribute/thanks',
        csrf_exempt(lambda r, addon_id: redirect('addons.detail', addon_id)),
        name='addons.thanks'),
    url('^contribute/$', views.contribute, name='addons.contribute'),
    url('^contribute/(?P<status>cancel|complete)$',
        views.paypal_result,
        name='addons.paypal'),
    url('^about$',
        lambda r, addon_id: redirect(
            'addons.installed', addon_id, permanent=True),
        name='addons.about'),
    ('^reviews/', include(review_patterns('addons'))),
    ('^versions/', include('versions.urls')),
)

urlpatterns = patterns(
    '',

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

    # Accept extra junk at the end for a cache-busting build id.
    url('^addons/buttons.js(?:/.+)?$', 'addons.buttons.js'),

    # For happy install button debugging.
    url('^addons/smorgasbord$', 'addons.buttons.smorgasbord'),
Exemplo n.º 3
0
    # TODO(andym): generate these instead of copying them around.
    url('^purchase/$', addons_views.purchase, name='apps.purchase'),
    url(r'purchase/start$',
        addons_views.paypal_start,
        name='apps.purchase.start'),
    url('^purchase/error/$',
        addons_views.purchase_error,
        name='apps.purchase.error'),
    url('^purchase/thanks/$',
        addons_views.purchase_thanks,
        name='apps.purchase.thanks'),
    url('^purchase/(?P<status>cancel|complete)$',
        addons_views.purchase_complete,
        name='apps.purchase.finished'),
    ('^reviews/', include(review_patterns('apps'))),
)

urlpatterns = patterns(
    '',
    url('^$', views.app_home, name='apps.home'),
    url('^search/$', 'search.views.app_search', name='apps.search'),

    # Review spam.
    url('^reviews/spam/$', 'reviews.views.spam', name='apps.reviews.spam'),
    url('^apps/(?P<category>[^/]+)?$', views.app_list, name='apps.list'),

    # URLs for a single app.
    ('^app/%s/' % APP_SLUG, include(detail_patterns)),
)
Exemplo n.º 4
0
from django.conf.urls.defaults import include, patterns

from reviews.urls import review_patterns


APP_SLUG = r"""(?P<app_slug>[^/<>"']+)"""

urlpatterns = patterns('',
    # TODO: Port reviews and add to `mkt/details`.
    ('^app/%s/reviews/' % APP_SLUG, include(review_patterns('apps'))),
)
Exemplo n.º 5
0
# These will all start with /app/<app_slug>/
detail_patterns = patterns(
    "",
    url("^$", addons_views.addon_detail, name="apps.detail"),
    url("^more$", addons_views.addon_detail, name="apps.detail_more"),
    url("^share$", views.share, name="apps.share"),
    url("^abuse$", addons_views.report_abuse, name="apps.abuse"),
    url("^record$", views.record, name="apps.record"),
    url("^contribute/$", addons_views.contribute, name="apps.contribute"),
    url("^contribute/(?P<status>cancel|complete)$", addons_views.paypal_result, name="apps.paypal"),
    # TODO(andym): generate these instead of copying them around.
    url("^purchase/$", addons_views.purchase, name="apps.purchase"),
    url(r"purchase/start$", addons_views.paypal_start, name="apps.purchase.start"),
    url("^purchase/error/$", addons_views.purchase_error, name="apps.purchase.error"),
    url("^purchase/thanks/$", addons_views.purchase_thanks, name="apps.purchase.thanks"),
    url("^purchase/(?P<status>cancel|complete)$", addons_views.purchase_complete, name="apps.purchase.finished"),
    ("^reviews/", include(review_patterns("apps"))),
)


urlpatterns = patterns(
    "",
    url("^$", views.app_home, name="apps.home"),
    url("^search/$", "search.views.app_search", name="apps.search"),
    # Review spam.
    url("^reviews/spam/$", "reviews.views.spam", name="apps.reviews.spam"),
    url("^apps/(?P<category>[^/]+)?$", views.app_list, name="apps.list"),
    # URLs for a single app.
    ("^app/%s/" % APP_SLUG, include(detail_patterns)),
)