I’m playing around with a Play application and I want to pass a list of DTOs from the controller to the template:@(dtos: List[MyDTO])
My first instinct is to add the DTO class to a new package named dtos, but if I do that I get an error when running the app: not found: type MyDTO. I tried adding @import dtos.MyDTO in the template, but I still get the error. If i put the DTO in the model package it works just fine, but I don’t want to do that as I don’t want that to interfere with Ebean table generation and evolutions.
So what packages are seen by default in the template, and how can I make my class visible to the template from a new package?
add this to your Build.scala: