I have a form in Django. If the user is authenticated, I want them to see a form that they can edit: if they aren't, then I would like them to see a display-only form.
In both cases, I want to show the same information, just that if they are authenticated then I want the form to be editable.
Is there an easy way to do this in Django? I can check user.is_authenticated either in the template or in the view: what I don't want to do is duplicate form code in the template.
I found this question, but the accepted answer looks insanely complicated. Surely there must be something inbuilt in Django to handle this problem?