Added missing arg in urlpatterns
Better URL regex
Refactoring in template render and preview API endpoints