]> git.parisson.com Git - teleforma.git/commitdiff
fix pdf
authorGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 4 Feb 2016 00:36:18 +0000 (01:36 +0100)
committerGuillaume Pellerin <guillaume.pellerin@ircam.fr>
Thu, 4 Feb 2016 00:36:18 +0000 (01:36 +0100)
teleforma/urls.py
teleforma/views/crfpa.py

index c49a4bffac12c882a0790a3e3f40092270fba61e..cb205dfef3cef7bcb4468b0a7402737c257ee299 100644 (file)
@@ -58,8 +58,8 @@ urlpatterns = patterns('',
     # (r'^accounts/register0/$', RegistrationView.as_view(), {'form_class':CustomRegistrationForm}),
     url(r'^accounts/register/$', UserAddView.as_view(), name="teleforma-register"),
     url(r'^accounts/register/(?P<username>.*)/complete/$', UserCompleteView.as_view(), name="teleforma-register-complete"),
-    url(r'^accounts/register/(?P<username>.*)/download/\?format=pdf', RegistrationPDFViewDownload.as_view(), name="teleforma-registration-download"),
-    url(r'^accounts/register/(?P<username>.*)/view/\?format=pdf', RegistrationPDFView.as_view(), name="teleforma-registration-view"),
+    url(r'^accounts/register/(?P<username>.*)/download/$', RegistrationPDFViewDownload.as_view(), name="teleforma-registration-download"),
+    url(r'^accounts/register/(?P<username>.*)/view/$', RegistrationPDFView.as_view(), name="teleforma-registration-view"),
 
     url(r'^captcha/', include('captcha.urls')),
 
index 093c70fc2080b1b43528e64634b35e463c61aeab..bd2aa64266a20a186c459f0990d00bcb003aa551 100644 (file)
@@ -435,6 +435,9 @@ class RegistrationPDFView(PDFTemplateResponseMixin, TemplateView):
     template_name = 'registration/registration_pdf.html'
     pdf_template_name = template_name
 
+    def is_pdf(self):
+        return True
+
     def get_context_data(self, **kwargs):
         context = super(RegistrationPDFView, self).get_context_data(**kwargs)
         user = User.objects.get(username=kwargs['username'])