Browse Source
Korekturovana PDF se uz daji pridavat pres admina. Pridan jednoduchy vypis korekturovanych veci.remotes/origin/opraf
Tomas "Jethro" Pokorny
9 years ago
12 changed files with 205 additions and 27 deletions
@ -1,3 +1,16 @@ |
|||
from django.contrib import admin |
|||
from reversion.admin import VersionAdmin |
|||
from korektury.models import KorekturovanePDF |
|||
|
|||
# Register your models here. |
|||
class KorekturovanePDFAdmin(VersionAdmin): |
|||
readonly_fields = ['cas', 'stran'] |
|||
fieldsets = [ |
|||
(None, {'fields': ['pdf', 'cas', 'stran', 'nazev', 'komentar']}), |
|||
# (u'PDF', {'fields': ['pdf']}), |
|||
] |
|||
list_display = ['pdf', 'cas', 'stran'] |
|||
list_filter = [] |
|||
search_fields = [] |
|||
|
|||
admin.site.register(KorekturovanePDF, KorekturovanePDFAdmin) |
|||
|
@ -0,0 +1,27 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
import django.utils.timezone |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('korektury', '0002_auto_20151202_2351'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='korekturovanepdf', |
|||
name='cas', |
|||
field=models.DateTimeField(default=django.utils.timezone.now, help_text=b'\xc4\x8cas vlo\xc5\xbeen\xc3\xad PDF', verbose_name='\u010das vlo\u017een\xed PDF'), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AddField( |
|||
model_name='korekturovanepdf', |
|||
name='stran', |
|||
field=models.IntegerField(default=0, help_text=b'Po\xc4\x8det stran PDF', verbose_name='po\u010det stran'), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,26 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('korektury', '0003_auto_20151204_1855'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='korekturovanepdf', |
|||
name='komentar', |
|||
field=models.TextField(help_text=b'Koment\xc3\xa1\xc5\x99 ke korekturovan\xc3\xa9mu PDF (nap\xc5\x99. na co se zam\xc4\x9b\xc5\x99it)', verbose_name='koment\xe1\u0159 k PDF', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AddField( |
|||
model_name='korekturovanepdf', |
|||
name='nazev', |
|||
field=models.TextField(help_text=b'N\xc3\xa1zev (nap\xc5\x99. 22.1 verze 4) korekturovan\xc3\xa9ho PDF', verbose_name='n\xe1zev PDF', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,32 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('korektury', '0004_auto_20151204_2240'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AlterField( |
|||
model_name='komentar', |
|||
name='autor', |
|||
field=models.CharField(help_text=b'Autor koment\xc3\xa1\xc5\x99e', max_length=20, verbose_name='autor koment\xe1\u0159e', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='korekturovanepdf', |
|||
name='nazev', |
|||
field=models.CharField(help_text=b'N\xc3\xa1zev (nap\xc5\x99. 22.1 verze 4) korekturovan\xc3\xa9ho PDF', max_length=50, verbose_name='n\xe1zev PDF', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
migrations.AlterField( |
|||
model_name='oprava', |
|||
name='autor', |
|||
field=models.CharField(help_text=b'Autor opravy', max_length=20, verbose_name='autor opravy', blank=True), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,20 @@ |
|||
# -*- coding: utf-8 -*- |
|||
from __future__ import unicode_literals |
|||
|
|||
from django.db import models, migrations |
|||
|
|||
|
|||
class Migration(migrations.Migration): |
|||
|
|||
dependencies = [ |
|||
('korektury', '0005_auto_20151204_2244'), |
|||
] |
|||
|
|||
operations = [ |
|||
migrations.AddField( |
|||
model_name='oprava', |
|||
name='pdf', |
|||
field=models.ForeignKey(default=-1, to='korektury.KorekturovanePDF'), |
|||
preserve_default=True, |
|||
), |
|||
] |
@ -0,0 +1,13 @@ |
|||
<html> |
|||
<head> |
|||
<meta http-equiv="Content-Type" content="text/html; charset=utf-8"> |
|||
<title>Seznam korektur</title> |
|||
</head> |
|||
<body> |
|||
<ul> |
|||
{% for pdf in object_list %} |
|||
<li> <b>{{ pdf.nazev }}</b> <i>{{pdf.komentar}}</i> <a href="/korektury/{{pdf.id}}">{{pdf.pdf.url}}</a> </li> |
|||
{% endfor %} |
|||
</ul> |
|||
</body> |
|||
<html> |
Loading…
Reference in new issue