Fixes to chargen form docs.

This commit is contained in:
Johnny 2018-10-26 22:22:03 +00:00
parent 664be38680
commit 5f7e2a179e

View file

@ -100,16 +100,17 @@ class CharacterForm(ObjectForm):
text and numbers respectively. IntegerFields have some neat validation tricks text and numbers respectively. IntegerFields have some neat validation tricks
they can do, like mandating values fall within a certain range. they can do, like mandating values fall within a certain range.
For example, a complete "age" field might look like: For example, a complete "age" field (which stores its value to
`character.db.age` might look like:
age = forms.IntegerField( age = forms.IntegerField(
label="Your Age", label="Your Age",
min_value=18, max_value=9000, min_value=18, max_value=9000,
help_text="Years since your birth.") help_text="Years since your birth.")
Default input fields are generic text boxes. You can control what sort of Default input fields are generic single-line text boxes. You can control what
input field users will see by specifying a "widget." An example of this is sort of input field users will see by specifying a "widget." An example of
used for the 'desc' field to show a Textarea box instead of a Textbox. this is used for the 'desc' field to show a Textarea box instead of a Textbox.
For help in building out your form, please see: For help in building out your form, please see:
https://docs.djangoproject.com/en/1.11/topics/forms/#building-a-form-in-django https://docs.djangoproject.com/en/1.11/topics/forms/#building-a-form-in-django