Govind Singh
Govind Singh

Reputation: 15490

object TemplatesPlugin is not a member of package securesocial.controllers

I am trying to implement my custom View with secure social

 "ws.securesocial" % "securesocial_2.11" % "3.0-M3",

But I am getting some error:

object TemplatesPlugin is not a member of package securesocial.controllers

So I visit the github project and found there is no TemplatesPlugin

https://github.com/jaliss/securesocial/tree/3.0-M3/module-code/app/securesocial/controllers

package app.com.myApp.plugin;

import play.api.mvc.{RequestHeader, Request};
import play.api.templates.Html;
import securesocial.controllers.TemplatesPlugin;
import securesocial.core.{SecuredRequest, SocialUser};
import play.api.data.Form;
import securesocial.core.SecureSocial._;
import securesocial.controllers.PasswordChange.ChangeInfo;


class MyViews(application: App) extends TemplatesPlugin {

  override def getLoginPage[A](implicit request: Request[A], form: Form[(String, String)],
                               msg: Option[String] = None): Html =
  {
    views.html.Secure.login(form, msg)
  }
  //...
  }

and my play.plugins

1500:com.typesafe.plugin.CommonsMailerPlugin
9997:app.com.myApp.plugin.MyViews

Then How I go further, What to change?

Upvotes: 1

Views: 182

Answers (1)

Jorge
Jorge

Reputation: 1403

The module does not use Play plugins any more. All what used to be a plugin is now a service that needs to get configured in the RuntimeEnvironment for your app.

Check out the sample apps to see how they provide their environments. You will need to override the viewTemplates attribute to use your custom views.

Upvotes: 1

Related Questions