Exemplo n.º 1
0
    def get_paths(self):
        paths = ["/users/", ]

        items = WaferUser.objects.all()
        for item in items:
            paths.append(item.get_absolute_url())

        view = UsersView()
        queryset = view.get_queryset()
        paginator = view.get_paginator(queryset,
                                       view.get_paginate_by(queryset))
        for page in paginator.page_range:
            paths.append(reverse('wafer_users_page',
                                 kwargs={'page': page}))
        return paths
Exemplo n.º 2
0
    def get_paths(self):
        paths = ["/users/", ]

        items = get_user_model().objects.all()
        for item in items:
            paths.append(reverse('wafer_user_profile',
                                 kwargs={'username': item.username}))

        view = UsersView()
        queryset = view.get_queryset()
        paginator = view.get_paginator(queryset,
                                       view.get_paginate_by(queryset))
        for page in paginator.page_range:
            paths.append(reverse('wafer_users_page',
                                 kwargs={'page': page}))
        return paths
Exemplo n.º 3
0
    def get_paths(self):
        paths = ['/users/']

        items = get_user_model().objects.all()
        for item in items:
            if not settings.WAFER_PUBLIC_ATTENDEE_LIST:
                # We need to filter out the non-publically
                # accessible paths from the static site
                if not item.userprofile.accepted_talks().exists():
                    continue
            paths.append(reverse('wafer_user_profile',
                                 kwargs={'username': item.username}))
        if settings.WAFER_PUBLIC_ATTENDEE_LIST:
            view = UsersView()
            queryset = view.get_queryset()
            paginator = view.get_paginator(queryset,
                                           view.get_paginate_by(queryset))
            for page in paginator.page_range:
                paths.append(reverse('wafer_users_page',
                                     kwargs={'page': page}))
        return paths
Exemplo n.º 4
0
    def get_paths(self):
        paths = ['/users/']

        items = get_user_model().objects.all()
        for item in items:
            if not settings.WAFER_PUBLIC_ATTENDEE_LIST:
                # We need to filter out the non-publically
                # accessible paths from the static site
                if not item.userprofile.accepted_talks().exists():
                    continue
            paths.append(reverse('wafer_user_profile',
                                 kwargs={'username': item.username}))
        if settings.WAFER_PUBLIC_ATTENDEE_LIST:
            view = UsersView()
            queryset = view.get_queryset()
            paginator = view.get_paginator(queryset,
                                           view.get_paginate_by(queryset))
            for page in paginator.page_range:
                paths.append(reverse('wafer_users_page',
                                     kwargs={'page': page}))
        return paths
Exemplo n.º 5
0
from django.conf.urls import patterns, url, include
from rest_framework import routers

from wafer.users.views import (UsersView, ProfileView, EditProfileView,
                               EditUserView, RegistrationView, UserViewSet)


router = routers.DefaultRouter()
router.register(r'users', UserViewSet)

urlpatterns = patterns(
    '',
    url(r'^$', UsersView.as_view(),
        name='wafer_users'),
    url(r'^api/', include(router.urls)),
    url(r'^page/(?P<page>\d+)$', UsersView.as_view(),
        name='wafer_users_page'),
    url(r'^(?P<username>[\w.@+-]+)/$', ProfileView.as_view(),
        name='wafer_user_profile'),
    url(r'^(?P<username>[\w.@+-]+)/edit/$', EditUserView.as_view(),
        name='wafer_user_edit'),
    url(r'^(?P<username>[\w.@+-]+)/edit_profile/$',
        EditProfileView.as_view(),
        name='wafer_user_edit_profile'),
    url(r'^(?P<username>[\w.@+-]+)/register/$',
        RegistrationView.as_view(),
        name='wafer_register_view'),
)
Exemplo n.º 6
0
Arquivo: urls.py Projeto: edrz/wafer
from django.conf.urls import patterns, url

from wafer.users.views import (UsersView, ProfileView, EditProfileView,
                               EditUserView)

urlpatterns = patterns(
    '',
    url(r'^$', UsersView.as_view(),
        name='wafer_users'),
    url(r'^page/(?P<page>\d+)$', UsersView.as_view(),
        name='wafer_users_page'),
    url(r'^(?P<username>[\w.@+-]+)/$', ProfileView.as_view(),
        name='wafer_user_profile'),
    url(r'^(?P<username>[\w.@+-]+)/edit/$', EditUserView.as_view(),
        name='wafer_user_edit'),
    url(r'^(?P<username>[\w.@+-]+)/edit_profile/$',
        EditProfileView.as_view(),
        name='wafer_user_edit_profile'),
)
Exemplo n.º 7
0
from django.conf.urls import include, url
from rest_framework import routers

from wafer.users.views import (UsersView, ProfileView, EditProfileView,
                               EditUserView, UserViewSet)

router = routers.DefaultRouter()
router.register(r'users', UserViewSet)

urlpatterns = [
    url(r'^$', UsersView.as_view(), name='wafer_users'),
    url(r'^api/', include(router.urls)),
    url(r'^page/(?P<page>\d+)/$', UsersView.as_view(),
        name='wafer_users_page'),
    url(r'^(?P<username>[\w.@+-]+)/$',
        ProfileView.as_view(),
        name='wafer_user_profile'),
    url(r'^(?P<username>[\w.@+-]+)/edit/$',
        EditUserView.as_view(),
        name='wafer_user_edit'),
    url(r'^(?P<username>[\w.@+-]+)/edit_profile/$',
        EditProfileView.as_view(),
        name='wafer_user_edit_profile'),
]
Exemplo n.º 8
0
from django.conf.urls.defaults import patterns, url

from wafer.users.views import (UsersView, ProfileView, EditProfileView,
                               EditUserView)

urlpatterns = patterns(
    '',
    url(r'^$', UsersView.as_view(),
        name='wafer_users'),
    url(r'^(?P<username>[\w.@+-]+)/$', ProfileView.as_view(),
        name='wafer_user_profile'),
    url(r'^(?P<username>[\w.@+-]+)/edit/$', EditUserView.as_view(),
        name='wafer_user_edit'),
    url(r'^(?P<username>[\w.@+-]+)/edit_profile/$',
        EditProfileView.as_view(),
        name='wafer_user_edit_profile'),
)
Exemplo n.º 9
0
from django.conf.urls.defaults import patterns, url

from wafer.users.views import (UsersView, ProfileView, EditProfileView,
                               EditUserView)

urlpatterns = patterns(
    '',
    url(r'^$', UsersView.as_view(), name='wafer_users'),
    url(r'^(?P<username>[\w.@+-]+)/$',
        ProfileView.as_view(),
        name='wafer_user_profile'),
    url(r'^(?P<username>[\w.@+-]+)/edit/$',
        EditUserView.as_view(),
        name='wafer_user_edit'),
    url(r'^(?P<username>[\w.@+-]+)/edit_profile/$',
        EditProfileView.as_view(),
        name='wafer_user_edit_profile'),
)