Beispiel #1
0
def ajax(request):
	return render_json(request, {
		'status': 'success',
		'users': [
			{
				'id': u.username,
				'name': u.profile.name(),
				'title': u.profile.title,
				'avatar': u.profile.avatar(),
			}
			for u in sorted_users(User.objects.filter(is_active=True, groups=11))
		],
	})
Beispiel #2
0
def ajax(request):
    return render_json(
        request, {
            'status':
            'success',
            'users': [{
                'id': u.username,
                'name': u.profile.name,
                'title': u.profile.title,
                'avatar': u.profile.avatar,
            } for u in sorted_users(
                User.objects.filter(is_active=True, groups=11))],
        })
Beispiel #3
0
def all(request):
    return render_json(
        request,
        {
            "status": "success",
            "activities": [
                {
                    "description": a.description,
                    "room": a.room.fullname if a.room else None,
                    "time": a.timeslot.start.astimezone(pytz.timezone(TIME_ZONE)).strftime("%X"),
                    "submission": a.submission.pk if a.submission else None,
                }
                for a in Activity.objects.order_by("timeslot__start")
            ],
        },
    )
Beispiel #4
0
def all(request):
    return render_json(
        request,
        {
            "status": "success",
            "submissions": [
                {
                    "speaker": s.user.profile.display_name,
                    "speakerbio": s.user.profile.bio,
                    "avatar": s.user.profile.avatar(),
                    "title": s.title,
                    "type": dict(Submission.SUBMISSION_TYPES)[s.type],
                    "abstract": s.abstract,
                    "room": s.room.fullname if s.room else None,
                    "time": s.time.isoformat() if s.time else None,
                }
                for s in Submission.objects.filter(status="A").order_by("type", "id")
            ],
        },
    )