participants.py 493 B

1234567891011121314
  1. from misago.threads.forms.posting import ThreadParticipantsForm
  2. from misago.threads.posting import PostingMiddleware, START
  3. class ThreadParticipantsFormMiddleware(PostingMiddleware):
  4. def use_this_middleware(self):
  5. return self.is_private
  6. def make_form(self):
  7. if self.request.method == 'POST':
  8. return ThreadParticipantsForm(
  9. self.request.POST, prefix=self.prefix)
  10. else:
  11. return ThreadParticipantsForm(prefix=self.prefix)