~widelands-dev/widelands-website/css_border

« back to all changes in this revision

Viewing changes to pybb/forms.py

  • Committer: franku
  • Date: 2019-03-21 06:47:41 UTC
  • mfrom: (526.1.15 latest_posts)
  • Revision ID: somal@arcor.de-20190321064741-9aeanwoiemla70w0
added a view to show more latest posts

Show diffs side-by-side

added added

removed removed

Lines of Context:
87
87
        post.updated = datetime.now()
88
88
        post.save(*args, **kwargs)
89
89
        return post
 
90
 
 
91
 
 
92
class LastPostsDayForm(forms.Form):
 
93
    days = forms.IntegerField(
 
94
        max_value = 1000,
 
95
        min_value = 5,
 
96
        )
 
97
    
 
98
    sort_by = forms.ChoiceField(
 
99
        choices = [('forum','Forum'),('topic', 'Topic'),],
 
100
        label = 'Group by:',
 
101
        )