Changeset 70a9bbd


Ignore:
Timestamp:
May 12, 2010, 4:28:37 AM (16 years ago)
Author:
Alex Dehnert <adehnert@…>
Branches:
master, client
Children:
ff0ea05
Parents:
5eb287f
git-author:
Alex Dehnert <adehnert@…> (05/12/10 04:25:09)
git-committer:
Alex Dehnert <adehnert@…> (05/12/10 04:28:37)
Message:

Serve LaTeX as LATEX_MIMETYPE (Trac: #29)

Set the default value of LATEX_MIMETYPE to application/x-latex. Note that
text/plain might be preferable, since most browsers will display it inline.
Also, this fixes the issue with the client erroring out.

Location:
remit
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • remit/settings.py

    r857256d r70a9bbd  
    3030AUTH_SOCK = None # Path to SocketAuth socket
    3131ENABLE_SCRIPTS_AUTH = True
     32
     33# Arguably usual MIME type; text/plain, while wrong, might work better by not
     34# making browsers want to open in an external application
     35LATEX_MIMETYPE = 'application/x-latex'
    3236
    3337from local_settings import *
  • remit/vouchers/views.py

    r857256d r70a9bbd  
    308308        'MEDIA_ROOT': settings.MEDIA_ROOT,
    309309    }
    310     response = render_to_response('vouchers/vouchers.tex', context, context_instance=RequestContext(http_request), )
     310    response = render_to_response(
     311        'vouchers/vouchers.tex',
     312        context, context_instance=RequestContext(http_request),
     313        mimetype=settings.LATEX_MIMETYPE,
     314    )
    311315
    312316    # Send mail
Note: See TracChangeset for help on using the changeset viewer.