'data' directory

99 views
Skip to first unread message

Jonathan Vanasco

unread,
Aug 1, 2012, 2:41:47 PM8/1/12
to pylons-discuss
this is puzzling me...

under my previous Pylons + Paster experience, the 'data' directory
( where sessions, templates, dogpile, etc ) would always happen within
the module

as i've moved to Pyramid and uwsgi , this seems to occur not there --
but in whatever directory i spawned the uwsgi server from

can anyone point me in a direction that will let me force/consolidate
the data directory to my choosing ?

Michael Merickel

unread,
Aug 1, 2012, 2:47:48 PM8/1/12
to pylons-...@googlegroups.com
It's typically relative to the CWD unless you specify an absolute path
like data_dir=%(here)s/data which was pretty common. In production I
certain would put a real absolute path to a directory with
write-access by the web server.
> --
> You received this message because you are subscribed to the Google Groups "pylons-discuss" group.
> To post to this group, send email to pylons-...@googlegroups.com.
> To unsubscribe from this group, send email to pylons-discus...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/pylons-discuss?hl=en.
>

Jonathan Vanasco

unread,
Aug 1, 2012, 4:01:13 PM8/1/12
to pylons-discuss
thanks!

is there a guide to what %(here) and other variables are available on
the ini ?

Chris Rossi

unread,
Aug 1, 2012, 4:03:42 PM8/1/12
to pylons-...@googlegroups.com
I think that's the only one. You can use variables you define in the ini:

foo = bar
some_setting = %(foo)s stool

Chris

Michael Merickel

unread,
Aug 1, 2012, 4:04:54 PM8/1/12
to pylons-...@googlegroups.com
Well %(here)s is the only special one. Other than that you can specify
anything and then fill it in at the command line (e.g. %(http_port)s
-> pserve foo.ini http_port=5000). This is old PasteScript
functionality that was ported to pserve. You can also reference other
settings you've defined in the file in a similar fashion.

Jonathan Vanasco

unread,
Aug 7, 2012, 12:46:41 PM8/7/12
to pylons-discuss
is this 'here' dir available in the request.settings ? didn't see it
in there, and it seems like it would be useful.

Michael Merickel

unread,
Aug 7, 2012, 1:02:20 PM8/7/12
to pylons-...@googlegroups.com
global_config['here'] and global_config['__file__'] exist when
PasteDeploy invokes your app's entry point (def main(global_config,
**settings) usually).

On Tue, Aug 7, 2012 at 11:46 AM, Jonathan Vanasco <jona...@findmeon.com> wrote:
> is this 'here' dir available in the request.settings ? didn't see it
> in there, and it seems like it would be useful.
>

Jonathan Vanasco

unread,
Apr 19, 2013, 6:13:25 PM4/19/13
to pylons-...@googlegroups.com
resurrecting this back from the dead...

would anyone know how to access the 'here' off a request object ?  is it possible?  If not, would someone know how/where to patch the settings to support this?

looking through the source, I only see 'here' value being set during logging setup. 




Mike Orr

unread,
Apr 20, 2013, 12:58:28 AM4/20/13
to pylons-...@googlegroups.com
In Pylons it's in the global config, not the app config. Maybe Pyramid is the same?


--
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 pylons-discus...@googlegroups.com.

To post to this group, send email to pylons-...@googlegroups.com.
Reply all
Reply to author
Forward
0 new messages