# # RestAuth is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the # implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License # for more details. # # You should have received a copy of the GNU General Public License along with RestAuth. If not, see # <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from django.conf.urls import url from Services.decorator import login_required from Users.views import UserHandlerView from Users.views import UserPropHandler from Users.views import UserPropsIndex from Users.views import UsersView urlpatterns = [ url(r'^$', login_required(realm='/users/')(UsersView.as_view()), name="users"), url(r'^(?P<name>[^/]+)/$', login_required(realm='/users/<user>/')(UserHandlerView.as_view()), name="users.user"), url(r'^(?P<name>[^/]+)/props/$', login_required(realm='/users/<user>/props/')(UserPropsIndex.as_view()), name='users.user.props'), url(r'^(?P<name>[^/]+)/props/(?P<subname>.+)/$', login_required(realm='/users/<user>/props/<prop>/')(UserPropHandler.as_view()), name='users.user.props.prop'), ]
from django.conf.urls import patterns from django.conf.urls import url from Services.decorator import login_required from Users.views import UserHandlerView from Users.views import UserPropHandler from Users.views import UserPropsIndex from Users.views import UsersView urlpatterns = patterns( 'Users.views', url(r'^$', login_required(realm='/users/')(UsersView.as_view()), name="users", ), url(r'^(?P<name>[^/]+)/$', login_required(realm='/users/<user>/')(UserHandlerView.as_view()), name="users.user", ), url(r'^(?P<name>[^/]+)/props/$', login_required(realm='/users/<user>/props/')( UserPropsIndex.as_view()), name='users.user.props' ), url(r'^(?P<name>[^/]+)/props/(?P<subname>.+)/$', login_required(realm='/users/<user>/props/<prop>/')( UserPropHandler.as_view()), name='users.user.props.prop' ), )
# RestAuth is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without # even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU # General Public License for more details. # # You should have received a copy of the GNU General Public License along with RestAuth. If not, # see <http://www.gnu.org/licenses/>. from __future__ import unicode_literals from Groups.views import GroupsView from Services.decorator import login_required from Users.views import UserPropsIndex from Users.views import UsersView users_view = UsersView.as_view() props_view = UserPropsIndex.as_view() groups_view = GroupsView.as_view() @login_required(realm="/test/users/") def users(request): return users_view(request, dry=True) @login_required(realm="/test/users/<user>/props/") def users_user_props(request, name): return props_view(request, name, dry=True) @login_required(realm="/test/groups/") def groups(request):