Fixed Error of search.
Refactor trainingVC to let the core data categories manage nsmanagedobjects. Fixed a bug with the trailing slash in django.