[ckan-dev] Plugin not found when deployed to a production server

Qifeng.Bai at csiro.au Qifeng.Bai at csiro.au
Tue Jun 10 05:12:24 UTC 2014


Yes, you are correct. I have worked it out

Many thanks for you rhelp

-----Original Message-----
From: ckan-dev [mailto:ckan-dev-bounces at lists.okfn.org] On Behalf Of Nigel Babu
Sent: Tuesday, 10 June 2014 3:10 PM
To: CKAN Development Discussions
Subject: Re: [ckan-dev] Plugin not found when deployed to a production server

Hi Qifeng,

Your plugin must not be installed inside the ckan folder, it should be on the same level as ckan instead.

/usr/lib/ckan/default/src/ckan <-- ckan source code. Don't touch this.

/usr/lib/ckan/default/src/ckanext-foo <-- this where your plugin should reside

Once you clone it there, you need to activate your virtualenv and install it:

source /usr/lib/ckan/default/bin/activate
cd /usr/lib/ckan/default/src/ckanext-foo
python setup.py develop

On Fri, Jun 06, 2014 at 02:04:47AM +0000, Qifeng.Bai at csiro.au wrote:
> Hi, there
> I have created a plugin and tested on my development server, All is OK
>
> The plugin sits in:
> /home/ckan/lib/default/src/nlmpext:
>                                                            ->ckanext
>                                                                          ->__init__.py
>                                                               -> nlmp  #this directory contain all my files
>                                                            ->setup.py
>
> In setup.py, I defined two extensions
>         experiment_nlmp=ckanext.nlmp.plugin:NlmpExperimentPlugin
>         project_nlmp=ckanext.nlmp.plugin:NlmpProjectFormPlugin
>
> I followed the guides, run python setup.py develop
>
> And then add these two plugins into 
> /home/ckan/set/default/development.ini
> ckan.plugins = stats text_preview recline_preview project_nlmp 
> experiment_nlmp
>
> ALL GOOD
>
> I have already created CKAN on window azure  from VM_DEPOT, the 
> production server also works well
>
> I have uploaded my extension to  
> /usr/lib/ckan/default/src/ckan/ckanext
>
> So the directory is /usr/lib/ckan/default/src/ckan/ckanext/nlmp
>                                                                                                      ->setup.py
>                                                                                                      ->ckanext
>                                                                                                         ->setup.py
>                                                                                                        ->ckanext
>                                                                                                                       ->__init__.py
>                                                                                                            
> -> nlmp  #this directory contain all my files Then I ran: python 
> setup.py develop See the log, seems all good: ckanext-nlmp 0.3 is 
> already the active version in easy-install.pth
>
> Also I added these two extions into production.ini. However, it gave me an error:
>                  PluginNotFoundException: project_nlmp
>
> I am aware of there is a __init__.py under 
> /usr/lib/ckan/default/src/ckan/ckanext/
> Although I don't have this file under nlmp folder, I wonder it still 
> mess up my namespace
>
> Any advice is appreciated
>
> Qifeng
>
>
>
>
>
>
> [cid:image001.gif at 01CC55BF.85E7FEB0]
>
> Qifeng Bai
> Software Engineer
> CSIRO Land and Water
> Black Mountain, Canberra
>
> Ph: +61-2-62465704
> Web: www.clw.csiro.au
>
>
>



> _______________________________________________
> 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


--
Nigel Babu
Developer, Open Knowledge
_______________________________________________
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



More information about the ckan-dev mailing list