###
2.9.8 Multiple Proxies

One feature of the `Model` class is that it allows multiple proxies to be attached to the same model, performing automatic notification to all of them. Internally, when a proxy attaches itself to a model, it lets the model know what attributes it is interested in; later, when that attribute changes, the model lets the proxy know. The syntax for using multiple proxies is straightforward; simply create the proxies and attach the same model to them. A small example (NewsForm/newsform4.py) follows:

This example shows some of the power of multiple proxies; as you edit the title you can see the label update immediately. If you look at the lines at the bottom, two proxies are attached to `item` - a `NewsProxy` instance, and a `NewsLabels` instance, which has labels that display the current contents of the model.

This feature can be used in many different ways, and if you create small proxies (that represent a part of the model, instead of the whole model) and embed them in other interfaces you can end up with very dynamic representations of your data. However, it should be noted that there are a few gotchas that you can run into when using multiple Proxies:

- Trying to edit the same value in two proxies. This is actually possible, but it is a bad idea, both UI-wise and implementation-wise. If you are using multiple proxies for a single model, have only one be editable and the others read-only (displaying information using labels, for instance). See in our example how the use of labels only in `NewsLabels` fits nicely into this rule.

- Attaching two proxies to the same model and forgetting about it. This can be quite misleading and hard to debug if you have a large application. If you have many proxies for the same class, and they are instantiated and run simultaneously, it may be tricky to notice that the model sends messages to update both when it changes. Thankfully, it is not common to have two windows with the same data loaded in the application. This is related to the "Undo" problem discussed further in section 2.9.