Although our implementation of user networks is working correctly, there is something missing. The interface does not tell the user whether an operation succeeded or failed. After sending an invitation, for example, the user is redirected back to the invitation form, with no feedback on whether the operation was successful or not. In this section, we are going to improve our interface by providing status messages to the user after performing certain actions.
Displaying messages to users is done using the message API, which is part of the authentication system. The API is simple. To create a message, you can use the following call:
request.user.message_set.create( message=u'Message text goes here.' )
This call ...