2018-08-13 07:02:14 -04:00
|
|
|
#!/usr/bin/env python3
|
|
|
|
"""
|
|
|
|
Form(s) for the create_quest page.
|
|
|
|
"""
|
|
|
|
from django import forms
|
|
|
|
|
2018-09-25 11:58:07 -04:00
|
|
|
from quest.models import Quest, Post
|
2018-08-13 07:02:14 -04:00
|
|
|
|
|
|
|
class QuestForm(forms.ModelForm):
|
|
|
|
"""
|
|
|
|
The main create_quest form.
|
|
|
|
"""
|
|
|
|
class Meta:
|
|
|
|
model = Quest
|
|
|
|
fields = ('title',)
|
|
|
|
|
|
|
|
|
|
|
|
class PostForm(forms.ModelForm):
|
|
|
|
"""
|
|
|
|
The form for beginning the first post of the quest.
|
|
|
|
"""
|
|
|
|
class Meta:
|
|
|
|
model = Post
|
|
|
|
fields = ('post_text',)
|