from django.conf.urls import include, patterns, url from tastypie.api import Api from mkt.account.api import InstalledResource from mkt.account.views import (AccountView, FeedbackView, LoginView, NewsletterView, PermissionsView) # Account API (old tastypie resources). account = Api(api_name='account') account.register(InstalledResource()) # Account API (new DRF views). drf_patterns = patterns('', url('^feedback/', FeedbackView.as_view(), name='account-feedback'), url('^login/', LoginView.as_view(), name='account-login'), url('^newsletter/', NewsletterView.as_view(), name='account-newsletter'), url('^permissions/(?P<pk>[^/]+)/$', PermissionsView.as_view(), name='account-permissions'), url('^settings/(?P<pk>[^/]+)/$', AccountView.as_view(), name='account-settings'), ) api_patterns = patterns('', url('^account/', include(drf_patterns)), url('^', include(account.urls)), )
from django.conf.urls import include, patterns, url from mkt.account.views import ( AccountView, FeedbackView, InstalledView, LoginView, LogoutView, NewsletterView, PermissionsView, ) drf_patterns = patterns( "", url("^feedback/$", FeedbackView.as_view(), name="account-feedback"), url("^installed/mine/$", InstalledView.as_view(), name="installed-apps"), url("^login/$", LoginView.as_view(), name="account-login"), url("^logout/$", LogoutView.as_view(), name="account-logout"), url("^newsletter/$", NewsletterView.as_view(), name="account-newsletter"), url("^permissions/(?P<pk>[^/]+)/$", PermissionsView.as_view(), name="account-permissions"), url("^settings/(?P<pk>[^/]+)/$", AccountView.as_view(), name="account-settings"), ) api_patterns = patterns("", url("^account/", include(drf_patterns)))
'', url('^feedback/$', FeedbackView.as_view(), name='account-feedback'), url('^installed/mine/$', InstalledViewSet.as_view({'get': 'list'}), name='installed-apps'), url('^installed/mine/remove_app/$', InstalledViewSet.as_view({'post': 'remove_app'}), name='installed-apps-remove'), # Native FxA login view. url('^login/$', LoginView.as_view(), name='account-login'), # Oauth FxA login view. url('^fxa-login/$', FxALoginView.as_view(), name='fxa-account-login'), url('^logout/$', LogoutView.as_view(), name='account-logout'), url('^newsletter/$', NewsletterView.as_view(), name='account-newsletter'), url('^permissions/(?P<pk>[^/]+)/$', PermissionsView.as_view(), name='account-permissions'), url('^settings/(?P<pk>[^/]+)/$', AccountView.as_view(), name='account-settings'), url(r'^shelves/$', FeedShelfViewSet.as_view( {'get': 'mine'}), name='feedshelves-mine'), ) api_patterns = patterns( '', url('^account/', include(drf_patterns)), ) user_patterns = patterns( '', url('^ajax$', views.ajax, name='users.ajax'), )
InstalledViewSet.as_view({'get': 'list'}), name='installed-apps'), url('^installed/mine/remove_app/$', InstalledViewSet.as_view({'post': 'remove_app'}), name='installed-apps-remove'), # Native FxA login view. url('^login/$', LoginView.as_view(), name='account-login'), # Oauth FxA login view. url('^fxa-login/$', FxALoginView.as_view(), name='fxa-account-login'), url('^logout/$', LogoutView.as_view(), name='account-logout'), url('^newsletter/$', NewsletterView.as_view(), name='account-newsletter'), url('^permissions/(?P<pk>[^/]+)/$', PermissionsView.as_view(), name='account-permissions'), url('^settings/(?P<pk>[^/]+)/$', AccountView.as_view(), name='account-settings'), url(r'^shelves/$', FeedShelfViewSet.as_view({'get': 'mine'}), name='feedshelves-mine'), url('^groups/(?P<pk>[^/]+)/$', GroupsViewSet.as_view({ 'get': 'list', 'post': 'create', 'delete': 'destroy' }), name='account-groups'), url('^dev-agreement/show/$', TOSShowView.as_view(), name='account-devagreement-show'), url('^dev-agreement/read/$',