Hi

I am looking for Pyramid add-ons development environment directory 
structure best practice.

To explain it better let's say started a Pyramid project using cookie 
cutter, it's repo name is main_package and selected sqlalchemy and jinja2 
during the installation. now adding new directory named pyramid_new_addon 
beside the main_package repo to develop a new Pyramid addon to be included 
in main_package using config.include and def includeme(config). all is good 
until pyramid_new_addon needs to use a different database than main_package 
database.

Is it possible to connect to different database using the same session that 
has been instantiated in main_package ? if it is not possible, what is the 
best practice for having each of new addons having their own database ?

Kotti has done a great job in adding new addons to main configurtor 
including alembic directory, however not clear how it handles it if new 
addons using it's own database:

    settings['pyramid.includes'] += ' kotti_addon'
    settings['kotti.alembic_dirs'] += ' kotti_addon:alembic'
    settings['kotti.available_types'] += ' 
kotti_addon.resources.CustomContent'

It would be nice to have a cookiecutter to create the pyramid_new_addon 
like what Kotti provides.

https://kotti.readthedocs.io/en/latest/first_steps/tut-1.html#creating-the-add-on-package

Thanks

-- 
You received this message because you are subscribed to the Google Groups 
"pylons-discuss" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion on the web visit 
https://groups.google.com/d/msgid/pylons-discuss/e06cec34-bcea-4a2c-a21d-7a83e12096d3n%40googlegroups.com.

Reply via email to