I am currently using CreateView for the class Order.
Part of the urls.py looks like this
url(
r'^orders/create/$',
CreateView.as_view(
model = Order,
template_name = 'doors/orders/create.html'
),
name = 'orders_create'
),
If I simply do a {{ form }} inside a oors/orders/create.html, then it will display all the fields declared in models.py.

What is the best way to customize the look of each field and to even control whether they are even visible or not (some of the fields are optional)?
To answer the part of your question concerning which fields of the model should be available in the form, you could create a custom form with
ModelForm. The optionsfieldsandexcludedefine which fields are available in the form:https://docs.djangoproject.com/en/dev/topics/forms/modelforms/#using-a-subset-of-fields-on-the-form
You would then tell the
CreateViewto use your custom form by addingform_class:Concerning the second part of your question (how to style the form and its fields), you could use
{{ form.as_p }},{{ form.as_table }}or put together a completely custom template:https://docs.djangoproject.com/en/dev/topics/forms/#displaying-a-form-using-a-template