Update models.py

Add get_anchor for dynamic anchors.