def members_edit(request, id): res = { 'pageType': 'edit', 'modelName': u'участника', 'model': gg_json.ggJsonPy(models.Member.objects.get(id = id), gg_json.makeJSONEncoderMemberCard()), } res.update(_members_item_common()) return res
def groups_edit(request, id): res = { 'pageType': 'edit', 'modelName': u'группу', 'model': gg_json.ggJsonPy(models.Group.objects.get(id = id), gg_json.makeJSONEncoderGroupCard()), } res.update(_groups_item_common()) return res
def users_edit(request, id): return { 'model': gg_json.ggJsonPy(django.contrib.auth.models.User.objects.get(id = id), gg_json.makeJSONEncoderUserCard()), 'pageType': 'edit', 'modelName': u'пользователя', }
def users(request): return { 'users': gg_json.ggJsonPy(django.contrib.auth.models.User.objects.all(), gg_json.makeJSONEncoderUserListing()) }
def _members_item_common(): return { 'groups': gg_json.ggJsonPy(models.Group.objects.all(), gg_json.makeJSONEncoderGroupListing()) }
def members(request): return { 'members': gg_json.ggJsonPy(models.Member.objects.all(), gg_json.makeJSONEncoderMemberListing()) }
def groups(request): return { 'groups': gg_json.ggJsonPy(models.Group.objects.all(), gg_json.makeJSONEncoderGroupListing()) }