[ckan-dev] Extending CKAN - login_form?

Matthew Fullerton matt.fullerton at gmail.com
Mon Jan 30 09:09:58 UTC 2017


Its not quite clear to me what you're trying to achieve, but I suspect you
might need/want to specify what controller is involved higher up at the
routing stage, see:

http://docs.ckan.org/en/latest/extensions/plugin-interfaces.html#ckan.plugins.interfaces.IRoutes
Examples:
https://gist.github.com/seanh/2352758
https://github.com/okfde/ckanext-offenedaten/blob/ckan-2.3/ckanext/offenedaten/plugin.py#L87

-Matt

--
Matt Fullerton
Software development & data science for open data and mobility
matt at crowdsalad.de
+49 89 7456 0495 / +49 176 5789 6501
http://www.crowdsalad.de



On 27 January 2017 at 00:49, Michael Speth <spethm at landcareresearch.co.nz>
wrote:

> I am trying to use the login_form.html snippet on a page that is not
> login.html.   I am using the following code:
>
>  {% snippet "user/snippets/login_form.html", action=c.login_handler,
> error_summary=error_summary %}
>
> I understand that c is a context variable and most likely doesn't have the
> login_handler variable at all since its not the login.html page.
>
> So I tried this:
> {% snippet "user/snippets/login_form.html", controller='ckan.controllers.user:UserController',
> action='c.login_handler', error_summary=error_summary %}
>
> Think that I need to use the UserController.  I have tried many
> combinations of the action parameter like /login_handler, login_handler,
> controller.login_handler, but nothing works.
>
> Any ideas would be very much appreciated.
>
> Thank you
>
> --
> Michael Speth
> DevOps Computer Engineer
> Landcare Research Consultant
>
> ------------------------------
>
> Please consider the environment before printing this email
> Warning: This electronic message together with any attachments is
> confidential. If you receive it in error: (i) you must not read, use,
> disclose, copy or retain it; (ii) please contact the sender immediately by
> reply email and then delete the emails.
> The views expressed in this email may not be those of Landcare Research
> New Zealand Limited. http://www.landcareresearch.co.nz
>
> _______________________________________________
> ckan-dev mailing list
> ckan-dev at lists.okfn.org
> https://lists.okfn.org/mailman/listinfo/ckan-dev
> Unsubscribe: https://lists.okfn.org/mailman/options/ckan-dev
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.okfn.org/pipermail/ckan-dev/attachments/20170130/e9553c52/attachment-0003.html>


More information about the ckan-dev mailing list