Re: WebHelpers2 and Unipath releases; WebHelpers looking for maintainer

2013-04-08 Thread Zak
Maybe the best thing to do is set a **DEPRECIATED** header on the WebHelpers README with a link to WebHelpers2. -- 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

Can a Pyramid app's root directory be renamed later without consequence?

2013-03-13 Thread Zak
When you start a new Pyramid app, it creates a directory with the capitalized name of your project like MyProject. Can this later be renamed to something like web or will this break functionality? -- You received this message because you are subscribed to the Google Groups pylons-discuss

Re: Pyramid Booth at PyCon 2013: Mummy Awesomeness Unleashed

2013-02-28 Thread Zak
I really want to make this, especially to see Chris's talk on Pyramid Security (https://us.pycon.org/2013/schedule/presentation/70/) which I've always found a bit confusing. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To unsubscribe from

Scam-proof pageviews with Pyramid?

2012-12-16 Thread Zak
I want keep a count of page views for each page of my Pyramid app. What's the best way to do this? Do I need to use my database to store the number or does Pyramid have a caching framework that would be simpler? How can I block duplicate IPs from registering pageviews for a period of time (for

Re: Scam-proof pageviews with Pyramid?

2012-12-16 Thread Zak
I didn't know Google Analytics had that feature. Thanks for the suggestion. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/100qC0fyDToJ. To post to this

Re: WebHelpers developments

2012-12-10 Thread Zak
When will WebHelpers2 available on PyPI? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/YoAC9wgWik8J. To post to this group, send email to

Re: WebHelpers developments

2012-12-03 Thread Zak
Christoph - Would you mind also putting the paginate module on github? Will the paginate update support both python 2.7 and python 3? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit

unauthenticated_userid() doesn't work until round-trip?

2012-11-17 Thread Zak
I'm trying to get the unauthenticated_userid immediately after calling remember(), but it's always None. Does unauthenticated_userid not get created until a full round-trip request is made with the user? How can I get the unauthenticated_userid immediately? Here is the code I'm using headers =

Extending JSON renderer produces not defined error

2012-11-09 Thread Zak
I'm trying to follow the instructions herehttp://pyramid.readthedocs.org/en/latest/api/renderers.html#pyramid.renderers.JSON to configure the JSON renderer. I want to add a default=json_util.default parameter to the JSON render's json.dumps line. Here is the config line I'm using to do that:

Re: Extending JSON renderer produces not defined error

2012-11-09 Thread Zak
Thanks, that got rid of the undefined name error, but now the server is throwing a 200 Internal Server Error when I try to use MongoSafeJSON. There's no error description. I assume there is something wrong with my default=json_util.default line...does the renderer know specifically to add that

Re: Extending JSON renderer produces not defined error

2012-11-09 Thread Zak
When you say breaking your default apart do you mean write my own custom renderer or add adapters to the built-in JSON renderer? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit

Re: Extending JSON renderer produces not defined error

2012-11-09 Thread Zak
Interesting, I'll definitely take a look at using add_adapter to my root object. Thanks for your help. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit

Re: ./run No such file or directory

2012-10-04 Thread Zak
Doug - I'm trying to run the stack locally with foreman. I'm not using paster serve development.ini because I'm using Gunicorn and it takes arguments that can't be set exclusively in an INI file. In the Pyramid tutorial for Heroku, the example says to create a procfile with the line web:

Re: ./run No such file or directory

2012-10-04 Thread Zak
Then why does the tutorial instruct a web: ./run procfile? try this: web: python runapp.py iirc, it's looking for something on the path (and you have created runapp.py not a script called run) -w -- You received this message because you are subscribed to the Google Groups

Re: ./run No such file or directory

2012-10-04 Thread Zak
correction: I'm not using paster serve development.ini because I'm using Gunicorn and it takes arguments that can't be set exclusively in an INI file *to my knowledge* On Thursday, October 4, 2012 2:20:32 PM UTC-5, Zak wrote: Doug - I'm trying to run the stack locally with foreman. I'm

Re: a bit lost ...

2012-10-04 Thread Zak
When people build on Pyramid, the workflow is more like: - start a new project - you might not see anything for a week - every day new features exist. the daily workflow is 7+ hours building application logic, 1hr dealing with Pyramid or 3rd party libraries - A few months in, and

./run No such file or directory

2012-09-30 Thread Zak
But it keeps giving me this error when I try to foreman start: zak$ sudo foreman start 12:27:59 web.1 | started with pid 1308 12:27:59 web.1 | /usr/local/foreman/bin/runner: line 36: /Users/MyProject/run: No such file or directory 12:27:59 web.1 | process terminated 12:27:59 system

Re: ./run No such file or directory

2012-09-30 Thread Zak
: /Users/zak/MyProject/run: No such file or directory -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/xh7ygDBnWGkJ. To post to this group, send email

How do I use something like multiprocessing.cpu_count() * 2 + 1 in an INI file?

2012-09-26 Thread Zak
I'm trying to setup Gunicorn to use with my Pyramid app. I want to set the number of workers as workers = multiprocessing.cpu_count() * 2 + 1 but obviously multiprocessing is a python module and won't run in development.ini/production.ini. If I use a separate config file for Gunicorn, then the

Re: How do I use something like multiprocessing.cpu_count() * 2 + 1 in an INI file?

2012-09-26 Thread Zak
So if you can run custom scripts beforehand with a runapp.py file, then what exactly does the pserve development.ini command do? Does it just start running everything with default settings? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To

Re: How do I use something like multiprocessing.cpu_count() * 2 + 1 in an INI file?

2012-09-26 Thread Zak
Cool, I think I understand much better now, thanks. I wish there was more examples of a Gunicorn-powered runnapp.py...they seem to be in short supply. On Wednesday, September 26, 2012 2:08:14 PM UTC-5, Whit Morriss wrote: The compromise (perhaps virtuous), is that you can do any

Re: Pyramid 1.4a1 released

2012-09-18 Thread Zak
The Pyramid team is really working hard to push these releases fast and furious...big thanks to you! -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit

Re: Pyramid's Response Errors and iOS NSError

2012-08-20 Thread Zak
Are there no other iOS developers on the mailing list? I would think at least a few of you would have run into a situation like this. It would be really useful to return your own custom 400 error responses and have the app interpret them. -- You received this message because you are

Pyramid's Response Errors and iOS NSError

2012-08-19 Thread Zak
I've built an iOS app that's powered by data proved by Pyramid. How can I use Pyramid's error framework such as self.request.response.status = 400 return json.dumps( { 'error' : 'The server was sent bad parameters!'}, default=json_util.default) to correctly populate an NSError?

Is there a terser way to get a reference to my DB than self.request.root.db?

2012-08-11 Thread Zak
self.request.root.db is quite a bit of dot notation and I'm wondering if there is a shortcut or better way to get db. -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit

KeyError when my root factory tries to access my INI file

2012-08-10 Thread Zak
I'm trying to setup mongodb as my root factory, but whenever I try to access a value in production.ini (like settings['mongo_uri']), it crashes saying KeyError even though that key does exist and is accessed perfectly in the Main function. Why can't it access the INI files? Here is a pastebin

Re: KeyError when my root factory tries to access my INI file

2012-08-10 Thread Zak
On Friday, August 10, 2012 10:36:43 PM UTC-5, Zak wrote: I'm trying to setup mongodb as my root factory, but whenever I try to access a value in production.ini (like settings['mongo_uri']), it crashes saying KeyError even though that key does exist and is accessed perfectly in the Main

Authorization tutorial for MongoDB?

2012-08-10 Thread Zak
Is there something like this ( auth tutorialhttp://pyramid.readthedocs.org/en/1.3-branch/tutorials/wiki/authorization.html ) but using MongoDB instead of zodb? There is a ton of zodb-specific steps in that tutorial so I'm finding it near impossible to adapt to mongo. -- You received this

Re: Trying to create a custom renderer and getting error

2012-06-04 Thread Zak
wrote: so you are importing json via import json ? and you are using some other thing called JSON ? On Mon, Jun 4, 2012 at 3:42 PM, Zak wrote: I'm trying to create a custom renderer like this: config = Configurator(settings=settings) config.add_renderer

Re: Trying to create a custom renderer and getting error

2012-06-04 Thread Zak
I think the problem is that I'm using Pyramid 1.3, not 1.4. Do you know how I can update? -- You received this message because you are subscribed to the Google Groups pylons-discuss group. To view this discussion on the web visit https://groups.google.com/d/msg/pylons-discuss/-/4HXDe3d1SdoJ.

Calling a view without a view-config or add-view

2012-04-03 Thread Zak
I want to map a route to a class-based view without needing to name the class again in a view-config decorator and without needing to explicitly name it in a config.add_view in the __init__. I want config.add_route('MyClass', '/') to map that route to @view_defaults(renderer='string')

Re: Calling a view without a view-config or add-view

2012-04-03 Thread Zak
. :-) On Tue, Apr 3, 2012 at 6:52 AM, Zak wrote: I want to map a route to a class-based view without needing to name the class again in a view-config decorator and without needing to explicitly name it in a config.add_view in the __init__. I want config.add_route('MyClass', '/') to map

Add_route as a decorator

2012-04-03 Thread Zak
Instead of using something like config.add_route('Index', '/') in my main, I want to add a route as a decorator which will be positioned next to the relevant view. Something like @view_addRoute(route'=/index) @view_config(route_name='Index', renderer='MyApp:html/compiled/index.mako') class

Re: multiple beaker sessions under pyramid ?

2012-03-05 Thread Zak
I'm very interested in functionality. Please keep us updated. On Monday, March 5, 2012 5:25:46 PM UTC-6, Jonathan Vanasco wrote: the config.set_request_property sounds like it'll be *perfect* i'll whip up a distributable based on that -- will be much better than hacking at pyramid core!