# HG changeset patch # User Madhusudan.C.S # Date 1291380178 -19800 # Node ID 142f7f94de19d9ec0a8a8dc9160be612a513d7a9 # Parent 2eb286e8961591b2a96fc8e1b06e319bec250ece Added settings static file path. diff -r 2eb286e89615 -r 142f7f94de19 project/scipycon/user/views.py --- a/project/scipycon/user/views.py Thu Dec 02 19:44:55 2010 +0530 +++ b/project/scipycon/user/views.py Fri Dec 03 18:12:58 2010 +0530 @@ -329,6 +329,9 @@ @login_required def badge(request,scope): + + from django.conf import settings + # Create the HttpResponse object with the appropriate PDF headers. response = HttpResponse(mimetype='application/pdf') response['Content-Disposition'] = 'attachment; filename=scipybadge.pdf' @@ -341,7 +344,8 @@ # See the ReportLab documentation for the full list of functionality. c.rect(ref,ref,9*cm,6*cm) - im = reportlabImage("project/static/img/scipyshiny_small.png", width=1.75*cm, height=1.75*cm) + img_path = os.path.join(settings.STATIC_ROOT, 'img', 'scipyshiny_small.png') + im = reportlabImage(img_path, width=1.75*cm, height=1.75*cm) im.drawOn(c,(ref+0.8*cm),(ref+4.3*cm)) c.setFont('Helvetica', 6) c.drawString((ref+1.0*cm),(ref+4.2*cm),'scipy.in 2010')