示例#1
0
     PersonalRegistrationView.as_view(success_url=reverse_lazy('home')),
     name='registration_register'),
 url_prefixed(r'users/(?P<user>[\w.@+-]+)/',
              UserProfileView.as_view(),
              name='users_profile'),
 url_prefixed(r'', include('django.contrib.auth.urls')),
 url_prefixed(r'saas/$',
              OrganizationListView.as_view(),
              name='saas_organization_list',
              decorators=['django.contrib.auth.decorators.login_required']),
 url_prefixed(r'$',
              TemplateView.as_view(template_name='index.html'),
              name='home'),
 url_prefixed(r'billing/cart/',
              login_required(
                  OrganizationRedirectView.as_view(
                      pattern_name='saas_organization_cart'),
                  login_url=reverse_lazy('registration_register')),
              name='saas_cart'),
 # saas urls with provider key to implement marketplace.
 url_prefixed(r'api/', include('saas.urls.api.cart')),
 url_prefixed(r'api/',
              include('saas.urls.api.broker'),
              decorators=['saas.decorators.requires_direct']),
 # api/charges/:charge/refund must be before api/charges/
 url_prefixed(r'api/',
              include('saas.urls.api.provider.charges'),
              decorators=['saas.decorators.requires_provider_only']),
 url_prefixed(r'api/',
              include('saas.urls.api.provider.billing'),
              decorators=['saas.decorators.requires_direct']),
 url_prefixed(r'api/',
示例#2
0
 url_prefixed(r'users/(?P<user>[\w.@+-]+)/',
     UserProfileView.as_view(), name='users_profile',
     decorators=['django.contrib.auth.decorators.login_required']),
 url_prefixed(r'users/',
     UserRedirectView.as_view(), name='accounts_profile',
     decorators=['django.contrib.auth.decorators.login_required']),
 url_prefixed(r'', include('django.contrib.auth.urls')),
 url_prefixed(r'saas/$',
     OrganizationListView.as_view(), name='saas_organization_list',
     decorators=['django.contrib.auth.decorators.login_required']),
 url_prefixed(r'$', TemplateView.as_view(template_name='index.html'),
     name='home'),
 url_prefixed(r'billing/cart/',
     login_required(
         OrganizationRedirectView.as_view(
             implicit_create_on_none=True,
             pattern_name='saas_organization_cart'),
         login_url=reverse_lazy('registration_register')),
     name='saas_cart'),
 # saas urls with provider key to implement marketplace.
 url_prefixed(r'api/', include('saas.backends.urls.api')),
 url_prefixed(r'api/', include('saas.urls.api.cart')),
 url_prefixed(r'api/', include('saas.urls.api.users'),
     decorators=['saas.decorators.requires_self_provider']),
 url_prefixed(r'api/', include('saas.urls.api.broker'),
     decorators=['saas.decorators.requires_provider_only']),
 url_prefixed(r'api/', include('saas.urls.api.search'),
     decorators=['django.contrib.auth.decorators.login_required']),
 # api/charges/:charge/refund must be before api/charges/
 url_prefixed(r'api/',
     include('saas.urls.api.provider.charges'),
示例#3
0
# CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL,
# EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO,
# PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS;
# OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY,
# WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

'''Urls'''

from django.conf.urls import url

from saas.settings import ACCT_REGEX
from saas.views import OrganizationRedirectView
from saas.views.profile import (RoleListView, OrganizationProfileView,
    SubscriptionListView)

urlpatterns = [
    url(r'^profile/(?P<organization>%s)/roles/(?P<role>%s)/'
        % (ACCT_REGEX, ACCT_REGEX),
        RoleListView.as_view(), name='saas_role_list'),
    url(r'^profile/(?P<organization>%s)/subscriptions/' % ACCT_REGEX,
        SubscriptionListView.as_view(), name='saas_subscription_list'),
    url(r'^profile/(?P<organization>%s)/$' % ACCT_REGEX,
        OrganizationProfileView.as_view(), name='saas_organization_profile'),
    url(r'^profile/$', OrganizationRedirectView.as_view(
            pattern_name='saas_organization_profile'),
        name='saas_profile'),
]

示例#4
0
# OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF
# ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
'''Urls'''

from django.conf.urls import patterns, url

from saas.settings import ACCT_REGEX
from saas.views import OrganizationRedirectView
from saas.views.profile import (ContributorListView, ManagerListView,
                                OrganizationProfileView, SubscriptionListView)

urlpatterns = patterns(
    'saas.views.profile',
    url(r'^(?P<organization>%s)/contributors/' % ACCT_REGEX,
        ContributorListView.as_view(),
        name='saas_contributor_list'),
    url(r'^(?P<organization>%s)/managers/' % ACCT_REGEX,
        ManagerListView.as_view(),
        name='saas_manager_list'),
    url(r'^(?P<organization>%s)/subscriptions/' % ACCT_REGEX,
        SubscriptionListView.as_view(),
        name='saas_subscription_list'),
    url(r'^(?P<organization>%s)/' % ACCT_REGEX,
        OrganizationProfileView.as_view(),
        name='saas_organization_profile'),
    url(r'^$',
        OrganizationRedirectView.as_view(
            pattern_name='saas_organization_profile'),
        name='saas_profile'),
)
示例#5
0
from django.conf.urls import url

from saas.settings import ACCT_REGEX
from saas.api.organizations import OrganizationDetailAPIView
from saas.api.subscriptions import (SubscriptionDetailAPIView,
    SubscriptionListAPIView)
from saas.api.users import (RoleListAPIView, RoleDetailAPIView)
from saas.views import OrganizationRedirectView


urlpatterns = [
    url(r'^(?P<organization>%s)/roles/(?P<role>%s)/(?P<user>%s)/?'
        % (ACCT_REGEX, ACCT_REGEX, ACCT_REGEX),
        RoleDetailAPIView.as_view(), name='saas_api_role_detail'),
    url(r'^(?P<organization>%s)/roles/(?P<role>%s)/?'
        % (ACCT_REGEX, ACCT_REGEX),
        RoleListAPIView.as_view(), name='saas_api_role_list'),
    url(r'^(?P<organization>%s)/subscriptions/(?P<subscribed_plan>%s)/?'
        % (ACCT_REGEX, ACCT_REGEX),
        SubscriptionDetailAPIView.as_view(),
        name='saas_api_subscription_detail'),
    url(r'^(?P<organization>%s)/subscriptions/?' % ACCT_REGEX,
        SubscriptionListAPIView.as_view(),
        name='saas_api_subscription_list'),
    url(r'^(?P<organization>%s)/?$' % ACCT_REGEX,
        OrganizationDetailAPIView.as_view(), name='saas_api_organization'),
    url(r'^$',
        OrganizationRedirectView.as_view(pattern_name='saas_api_organization'),
        name='saas_api_profile'),
]
示例#6
0
 url(r'^admin/doc/', include('django.contrib.admindocs.urls')),
 url(r'^admin/', include(admin.site.urls)),
 url(r'^accounts/register/$',
     PersonalRegistrationView.as_view(
         success_url=reverse_lazy('home')),
     name='registration_register'),
 url(r'^users/(?P<user>[\w.@+-]+)/',
     UserProfileView.as_view(), name='users_profile'),
 url(r'^accounts/', include('django.contrib.auth.urls')),
 url(r'^saas/$',
     OrganizationListView.as_view(), name='saas_organization_list',
     decorators=['django.contrib.auth.decorators.login_required']),
 url(r'^', include('saas.urls.noauth')),
 url(r'^$', TemplateView.as_view(template_name='index.html'), name='home'),
 url(r'^billing/cart/',
     login_required(OrganizationRedirectView.as_view(
             pattern_name='saas_organization_cart'),
                    login_url=reverse_lazy('registration_register')),
     name='saas_cart'),
 # saas urls with provider key to implement marketplace.
 url(r'^api/', include('saas.urls.api.cart')),
 url(r'^api/', include('saas.urls.api.broker'),
     decorators=['saas.decorators.requires_direct']),
 url(r'^api/', include('saas.urls.api.provider'),
     decorators=['saas.decorators.requires_direct']),
 url(r'^api/', include('saas.urls.api.subscriber'),
     decorators=['saas.decorators.requires_provider']),
 url(r'^pricing/', CartPlanListView.as_view(), name='saas_cart_plan_list'),
 url(r'^provider/', include('saas.urls.provider'),
     decorators=['saas.decorators.requires_direct']),
 url(r'^', include('saas.urls.broker'),
     decorators=['saas.decorators.requires_direct']),
示例#7
0
from saas.api.organizations import OrganizationDetailAPIView
from saas.api.subscriptions import (SubscriptionDetailAPIView,
                                    SubscriptionListAPIView)
from saas.api.users import (RoleListAPIView, RoleDetailAPIView)
from saas.views import OrganizationRedirectView

urlpatterns = patterns(
    'saas.api',
    url(r'^(?P<organization>%s)/roles/(?P<role>%s)/(?P<user>%s)/?' %
        (ACCT_REGEX, ACCT_REGEX, ACCT_REGEX),
        RoleDetailAPIView.as_view(),
        name='saas_api_role_detail'),
    url(r'^(?P<organization>%s)/roles/(?P<role>%s)/?' %
        (ACCT_REGEX, ACCT_REGEX),
        RoleListAPIView.as_view(),
        name='saas_api_role_list'),
    url(r'^(?P<organization>%s)/subscriptions/(?P<subscribed_plan>%s)/?' %
        (ACCT_REGEX, ACCT_REGEX),
        SubscriptionDetailAPIView.as_view(),
        name='saas_api_subscription_detail'),
    url(r'^(?P<organization>%s)/subscriptions/?' % ACCT_REGEX,
        SubscriptionListAPIView.as_view(),
        name='saas_api_subscription_list'),
    url(r'^(?P<organization>%s)/?$' % ACCT_REGEX,
        OrganizationDetailAPIView.as_view(),
        name='saas_api_organization'),
    url(r'^$',
        OrganizationRedirectView.as_view(pattern_name='saas_api_organization'),
        name='saas_api_profile'),
)