diff --git a/mural/migrations/0006_auto_20170209_1434.py b/mural/migrations/0006_auto_20170209_1434.py new file mode 100644 index 0000000..874b3a2 --- /dev/null +++ b/mural/migrations/0006_auto_20170209_1434.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-02-09 17:34 +from __future__ import unicode_literals + +from django.db import migrations, models +import django.db.models.deletion + + +class Migration(migrations.Migration): + + dependencies = [ + ('mural', '0005_mural_edited'), + ] + + operations = [ + migrations.AlterField( + model_name='comment', + name='post', + field=models.ForeignKey(null=True, on_delete=django.db.models.deletion.CASCADE, related_name='comment_post', to='mural.Mural', verbose_name='Post'), + ), + ] diff --git a/pdf_file/forms.py b/pdf_file/forms.py index 5c5f071..e71e029 100644 --- a/pdf_file/forms.py +++ b/pdf_file/forms.py @@ -24,7 +24,7 @@ class PDFFileForm(forms.ModelForm): tags = forms.CharField(label = _('Tags'), required = False) class Meta: model = PDFFile - fields = ['name', 'file', 'brief_description', 'all_students', 'students', 'groups', 'visible'] + fields = ['name', 'file', 'brief_description','show_window', 'all_students', 'students', 'groups', 'visible'] labels = { 'name': _('File name'), } diff --git a/pdf_file/migrations/0002_auto_20170209_1434.py b/pdf_file/migrations/0002_auto_20170209_1434.py new file mode 100644 index 0000000..10bc994 --- /dev/null +++ b/pdf_file/migrations/0002_auto_20170209_1434.py @@ -0,0 +1,21 @@ +# -*- coding: utf-8 -*- +# Generated by Django 1.10.4 on 2017-02-09 17:34 +from __future__ import unicode_literals + +from django.db import migrations, models +import pdf_file.models + + +class Migration(migrations.Migration): + + dependencies = [ + ('pdf_file', '0001_initial'), + ] + + operations = [ + migrations.AlterField( + model_name='pdffile', + name='file', + field=models.FileField(upload_to='files/', validators=[pdf_file.models.validate_file_extension], verbose_name='File'), + ), + ] diff --git a/pdf_file/models.py b/pdf_file/models.py index 1768fa9..158550a 100644 --- a/pdf_file/models.py +++ b/pdf_file/models.py @@ -16,6 +16,7 @@ def validate_file_extension(value): class PDFFile(Resource): file = models.FileField(_('File'), upload_to='files/', validators = [validate_file_extension]) + class Meta: verbose_name = "PDFFile" verbose_name_plural = "PDFFiles" diff --git a/pdf_file/templates/pdf_file/_form.html b/pdf_file/templates/pdf_file/_form.html index 8e0b58c..7c0d050 100644 --- a/pdf_file/templates/pdf_file/_form.html +++ b/pdf_file/templates/pdf_file/_form.html @@ -87,6 +87,29 @@ {% endif %} +