Re: Trying out the new Beaker

2009-05-11 Thread Faried Nawaz
Graham Higgins gjhigg...@googlemail.com
writes:

 The data_dir kwarg is required, the decorator throws an exception if
 it's omitted:

 MissingCacheParameter: data_dir or file_dir is required

 (What's the difference between data_dir and file_dir?)

 My middleware.py has (as per usual):

 app = CacheMiddleware(app, config)

 Shouldn't that be picking up the .ini directives?

I also ran into this problem just a few minutes ago.  In my case, I was
doing

return render('/some-template', cache_expire=43200)

render_mako doesn't like a cache_dir kwarg.


Faried.
-- 
( (length eclipse) (length emacs)) = T


pgpkuXacabP9H.pgp
Description: PGP signature


Re: app engine - state of play - 0.9.7

2009-05-11 Thread Wichert Akkerman

Previously Wichert Akkerman wrote:
 
 Previously Ben Bangert wrote:
  On May 3, 2009, at 7:42 AM, Wichert Akkerman wrote:
  
  And it's not limited to GAE; interactive traceback hasn't work for me
  for a month or so.
  
  It hasn't? What is happening instead?
 
 I click on the + and get a javascript error.

I noticed something interesting today: interactive traceback does not
work with Firefox 3.5b4, but works fine with Safari 4 beta.

Wichert.

-- 
Wichert Akkerman wich...@wiggy.netIt is simple to make things.
http://www.wiggy.net/   It is hard to make things simple.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Formencode / htmlfill or formhelpers example?

2009-05-11 Thread Domhnall Walsh
Hi all:

I've stumbled across something I can't find relevant documentation for, so
I'm hoping someone can help me with this.

I've got several complex forms (when I say complex, I guess I mean that
they deal with groups of related items - for example, I have a list of
schools that someone will have attended, where for each entry there's the
name of the school, the level at which the education is being conducted
(university, high/secondary school, etc.), start and end dates, and so on.
Basically, I'm using variable_decode() a lot to group items together).

Each form lists all of the existing entries for a given type of data (such
as a spell in a school/university as described above) in tabular form, and
leaves a blank set of fields at the bottom for users to add another row to
the table, so to speak. There are two different submit buttons for the form;
one deletes any entries where the related checkbox is ticked, and the other
saves any updates to the database.

The big thing I want to do is something pretty fundamental, really - in the
event that the validation fails, or if someone deletes an entry having made
changes to another, that the form comes back to the user with his/her
unsaved changes intact. I've looked at formhelpers, which doesn't look like
it plays nice with forms that don't have a fixed number of fields, and
htmlfill looks promising, but I can't quite see how exactly I'm supposed to
do what I need in this instance - I've got the added gotcha that the dict
returned by variable_decode can be a couple of levels deep - for example,
the validation for the start and end dates I described above includes a
check to see if the start date is before the end date, and this is separate
to the body of the main row validator, so I can end up with
form_result['entry'][0]['date']['start'] or some such in the form_result
dictionary from FormEncode.

If anyone could recommend an approach to take on this, or perhaps provide
some sample code, it'd be great.
Thanks,
Domhnall.

-- 
Quidquid latine dictum sit, altum sonatur.
(Whatever is said in Latin sounds profound)

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Pylons is in the Python docs.

2009-05-11 Thread Daniele Paolella

Don't let it go unnoticed, Pylons and Paste are mentioned in the
Python howtos: 
http://docs.python.org/howto/webservers.html#other-notable-frameworks
-- I don't know how long they've been there, take it as an excuse to
congratulate Ben, James, Ian and Mike on their work!
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: MySQL-python installation nightmare

2009-05-11 Thread Jeremy Burton
Thanks - that was the solution.

I also added a comment at the bottom of the tutorial at 
http://www.pylonshq.com/docs/en/0.9.7/models/ since I think many others will 
run into this issue if developing on a Windows box.

--- On Fri, 5/8/09, Jens Hoffrichter jens.hoffrich...@gmail.com wrote:
From: Jens Hoffrichter jens.hoffrich...@gmail.com
Subject: Re: MySQL-python installation nightmare
To: pylons-discuss@googlegroups.com
Date: Friday, May 8, 2009, 11:19 AM

Mmmh, I'm not sure this is the right question to ask, but as you don't
mention it in your mail: Why don't you just take a binary installation
from mysql-python.sourceforge.net? Either the precompiled .egg or the
setup binary - that worked for me everytime I worked with mysql and
python on a windows environment...

Jens





  
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



trouble building docs

2009-05-11 Thread Walter Cruz
pylons repo get from: http://pylonshq.com/hg/pylons-dev/

(sphinx)wal...@stark ~/devel/python/pylons/pylons/docs/en$ make html
mkdir -p _build/html _build/doctrees
sphinx-build -b html -d _build/doctrees   . _build/html
Running Sphinx v0.6.1
loading pickled environment... not found
building [html]: targets for 77 source files that are out of date
updating environment: 77 added, 0 changed, 0 removed
Exception occurred:[ 58%]
thirdparty/formencode_api

  File
/home/walter/.virtualenvs/sphinx/lib/python2.5/site-packages/Sphinx-0.6.1-py2.5.egg/sphinx/ext/autodoc.py,
line 487, in get_object_members
for mname in self.get_attr(self.object, '__dict__')])
RuntimeError: dictionary changed size during iteration
The full traceback has been saved in /tmp/sphinx-err-OtGUsQ.log, if you want
to report the issue to the author.
Please also report this if it was a user error, so that a better error
message can be provided next time.
Send reports to sphinx-...@googlegroups.com. Thanks!
make: ** [html] Erro 1


The trouble is with pylons docs or sphinx?

-- 
[]'
- Walter
waltercruz.com

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: asynchronous view cache updating

2009-05-11 Thread will welch

Not sure how this thread got hijacked into MySQL-python installation
nightmare, but I'm setting it back to the subject that is of more
interest to me.

-- Will


On May 8, 8:03 pm, will welch welch.quietple...@gmail.com wrote:
 For this afternoon's quick hack, I don't check. Your one-writer-many-
 readers lock in the cache means that any update-the-cache page
 requests that arrive while a new page is being computed have no effect
 (well, they return the old cached page immediately, but nobody is
 listening to what these updater requests return). So it's a little
 wasteful in this dogpiling example, but no extra pages are actually
 computed.

 On May 8, 6:09 pm, Ben Bangert b...@groovie.org wrote:

  On May 8, 2009, at 4:34 PM, will welch wrote:

   Because I was caching entire pages generated by a controller,
   I dodged working out such a creation function (with its own
   controller
   environment and SA session). Instead I wrote a middleware that
   intercepts
   a page request, fires up a thread that does a urllib.urlretrieve on
   that same
   url but with a secret update-the-cache url parameter set, meanwhile
   proceeding with forwarding the request along the stack for processing
   in the usual way (which will ultimately fetch the currently cached
   version
   of the requested page with no delay).

  You have some sort of locking in place so that only one thread is  
  spawned? I mean, if it was to expire, and 30 requests came in at the  
  same time before it was done, it wouldn't fire up 30 threads would it?

  Cheers,
  Ben

   smime.p7s
  3KViewDownload
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: trouble building docs

2009-05-11 Thread Philip Jenvey


On May 11, 2009, at 12:11 PM, Walter Cruz wrote:

 pylons repo get from: http://pylonshq.com/hg/pylons-dev/

 (sphinx)wal...@stark ~/devel/python/pylons/pylons/docs/en$ make html
 mkdir -p _build/html _build/doctrees
 sphinx-build -b html -d _build/doctrees   . _build/html
 Running Sphinx v0.6.1
 loading pickled environment... not found
 building [html]: targets for 77 source files that are out of date
 updating environment: 77 added, 0 changed, 0 removed
 Exception occurred:[ 58%] thirdparty/formencode_api
   File /home/walter/.virtualenvs/sphinx/lib/python2.5/site-packages/ 
 Sphinx-0.6.1-py2.5.egg/sphinx/ext/autodoc.py, line 487, in  
 get_object_members
 for mname in self.get_attr(self.object, '__dict__')])
 RuntimeError: dictionary changed size during iteration
 The full traceback has been saved in /tmp/sphinx-err-OtGUsQ.log, if  
 you want to report the issue to the author.
 Please also report this if it was a user error, so that a better  
 error message can be provided next time.
 Send reports to sphinx-...@googlegroups.com. Thanks!
 make: ** [html] Erro 1


 The trouble is with pylons docs or sphinx?


Luckily sphinx-build has a pdb option (-P) which let me narrow this  
down easily, formencode.Validator triggers it. It's really a sphinx  
bug with tricky classes, this fixes it:

http://pylonshq.com/pasties/cd4b0d856ce7efe39b8e7378b931c3ee

Could you maybe log a ticket about this with Sphinx?

I get another even stranger error after this when it's autodocing  
WebOb. Do you get this with the patch applied?

Exception occurred:[ 89%] thirdparty/webob
   File /Users/pjenvey/src/python/pylons-apple/lib/python2.5/site- 
packages/Sphinx-0.6.1-py2.5.egg/sphinx/ext/autodoc.py, line 844, in  
import_object
 self.doc_as_attr = (self.objpath[-1] != self.object.__name__)
AttributeError: '_AnyETag' object has no attribute '__name__'

-

  from webob.etag import _AnyETag
  _AnyETag.__name__
'_AnyETag'

FYI downgrading Sphinx should get around all this.

--
Philip Jenvey

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---



Re: Auth - django-authopenid alternative

2009-05-11 Thread Julio Napurí Carlos

I am thinking to use out of the box solution... Anyway I will test
both options to create these and use openid-selector.

Thanks guys
Both solutions are useful

-- 
Best Regards /Saludos
Blog: http://napuri.com.ar/

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
pylons-discuss group.
To post to this group, send email to pylons-discuss@googlegroups.com
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.com
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en
-~--~~~~--~~--~--~---