diff --git a/apps/prelaunch/txt2wrk-description.pdf b/apps/prelaunch/txt2wrk-description.pdf new file mode 100644 index 0000000..98a8eef Binary files /dev/null and b/apps/prelaunch/txt2wrk-description.pdf differ diff --git a/apps/prelaunch/views.py b/apps/prelaunch/views.py index 42b209a..558f2c8 100644 --- a/apps/prelaunch/views.py +++ b/apps/prelaunch/views.py @@ -173,8 +173,11 @@ @author: Jon ''' +import os + from django.conf import settings from django.core.urlresolvers import reverse +from django.http import HttpResponse from django.shortcuts import render_to_response, redirect from django.views.decorators.csrf import csrf_exempt from registration.views import register @@ -236,3 +239,24 @@ def about(request, template=None): ctxt['form'] = DemoApplicantRegistrationForm() ctxt['settings'] = settings return render_to_response(template, ctxt, context_instance = RequestContext(request)) + +txt2wrk_details_pdf = None +def txt2wrk_details(request): + # Global variable so we don't have to read the file from + # disk each time. + global txt2wrk_details_pdf + + if txt2wrk_details_pdf is None: + # Build filename to 1x1 white pixel file + # (same directory as this) + base = os.path.split(os.path.abspath(__file__))[0] + filename = os.path.join(base, 'txt2wrk-description.pdf') + + # Grab the contents to serve + f = open(filename) + txt2wrk_details_pdf = f.read() + f.close() + + # Create response to give + response = HttpResponse(txt2wrk_details_pdf, mimetype="application/pdf") + return response diff --git a/templates/about/about.html b/templates/about/about.html index 00d4bc6..ecc3224 100644 --- a/templates/about/about.html +++ b/templates/about/about.html @@ -18,7 +18,7 @@

About txt2wrk!

Txt2wrk helps parolees, homeless, and other job seekers compete on a more level playing field by providing text-to-speech delivery of job postings on any mobile phone. Job seekers receive text message alerts of new job postings, listen to job descriptions, and submit job applications, 24-hours a day, all without a connection to the internet.

Txt2wrk is compatible with any mobile phone, ensuring job seekers with low literacy and limited access to broadband have equal access to public and private job resources offered by local workforce development and social service agencies.

-

For more details about txt2wrk, download a PDF: txt2wrk.pdf

+

For more details about txt2wrk, download a PDF: txt2wrk.pdf

diff --git a/urls.py b/urls.py index 70fd53e..0dea8f0 100644 --- a/urls.py +++ b/urls.py @@ -15,6 +15,7 @@ url(r'^$', 'prelaunch.views.splash', { 'template': 'about/splash.html', }, name='splash'), url(r'^contact/$', 'prelaunch.views.contact', { 'template': 'about/contact.html', }, name='contact'), url(r'^about/$', 'prelaunch.views.about', { 'template': 'about/about.html', }, name='about'), + url(r'^description/$', 'prelaunch.views.txt2wrk_details', {}, name='description'), url(r'^unsubscribe/$', 'account.views.unsubscribe', { 'template': 'about/unsubscribe.html'}, name='unsubscribe'),