Live Templates let you generate many typical code constructs in seconds. For example, type for in a Django template

and then press the Tab key to see what happens.

Use the Tab key to move between the template fields.

See Live Templates page of the Settings / Preferences dialog for more details.