# Formats
xml_file = models.FileField(_('XML file'), upload_to='books/xml', blank=True)
+ html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True)
pdf_file = models.FileField(_('PDF file'), upload_to='books/pdf', blank=True)
odt_file = models.FileField(_('ODT file'), upload_to='books/odt', blank=True)
- html_file = models.FileField(_('HTML file'), upload_to='books/html', blank=True)
+ txt_file = models.FileField(_('TXT file'), upload_to='books/txt', blank=True)
parent = models.ForeignKey('self', blank=True, null=True, related_name='children')
{% endif %}
<div id="formats">
<ul>
+ {% if book.html_file %}
+ <li><a href="{{ book.html_file.url }}">Czytaj online</a></li>
+ {% endif %}
{% if book.pdf_file %}
<li><a href="{{ book.pdf_file.url }}">Pobierz plik PDF</a></li>
{% endif %}
{% if book.odt_file %}
<li><a href="{{ book.odt_file.url }}">Pobierz plik ODT</a></li>
{% endif %}
- {% if book.html_file %}
- <li><a href="{{ book.html_file.url }}">Pobierz plik HTML</a></li>
+ {% if book.txt_file %}
+ <li><a href="{{ book.txt_file.url }}">Pobierz plik TXT</a></li>
{% endif %}
</ul>
</div>