if not (reportlab.Version[0] == '2' and reportlab.Version[2] >= '1'):
    raise ImportError('Reportlab Version 2.1+ is needed!')
REPORTLAB22 = reportlab.Version[0] == '2' and reportlab.Version[2] >= '2'
xhtml2pdf ImportError — Джанго