# (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')),
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'])