Split registry handling into its own function for easier subclassing.
Split registry handling into its own function for easier subclassing.

--HG--
branch : trunk

Pylons/pylons,moreati/pylons,moreati/pylons,Pylons/pylons,Pylons/pylons,moreati/pylons