~widelands-dev/widelands-website/trunk

« back to all changes in this revision

Viewing changes to pybb/forms.py

  • Committer: kaputtnik
  • Date: 2019-08-15 08:32:03 UTC
  • mto: This revision was merged to the branch mainline in revision 549.
  • Revision ID: kaputtnik-20190815083203-d8bk37wcwive08y1
cleanups

Show diffs side-by-side

added added

removed removed

Lines of Context:
11
11
from pybb import settings as pybb_settings
12
12
from django.conf import settings
13
13
from .util import validate_file
14
 
from mainpage import validators
 
14
from mainpage.validators import virus_scan
15
15
 
16
16
 
17
17
class AddPostForm(forms.ModelForm):
19
19
    attachment = forms.FileField(
20
20
        label=_('Attachment'),
21
21
        required=False,
22
 
        validators=[validators.virus_scan, validate_file, ])
 
22
        validators=[virus_scan, validate_file, ])
23
23
 
24
24
    class Meta:
25
25
        model = Post