diff options
Diffstat (limited to 'master/autotua/views.py')
-rw-r--r-- | master/autotua/views.py | 16 |
1 files changed, 13 insertions, 3 deletions
diff --git a/master/autotua/views.py b/master/autotua/views.py index 5b86b16..b295a3d 100644 --- a/master/autotua/views.py +++ b/master/autotua/views.py @@ -7,13 +7,23 @@ # from django.http import HttpResponse -from django.shortcuts import get_object_or_404, render_to_response -from master.models import User +from django.shortcuts import * +from master.models import User, Job from django.conf import settings +import process def user_page(request, username): user = get_object_or_404(User, username=username) details = {'media_prefix': settings.MEDIA_PREFIX} for i in ('first_name', 'last_name', 'email',): details[i] = getattr(user, i) - return render_to_response('content.html', details) + return render_to_response('userpage.html', details) + +def jobs_page(request, username): + user = get_object_or_404(User, username=username) + jobs = get_list_or_404(Job, maintainer=user) + for job in jobs: + job.stage_url = process.generate_stage_url(job) + details = { 'media_prefix': settings.MEDIA_PREFIX, + 'jobs': jobs } + return render_to_response('jobs.html', details) |