Re: FormEncode and International Languages

2009-01-27 Thread Wichert Akkerman

Previously Jonathan Vanasco wrote:
 fair on some points, i disagree with others.
 
 i'm in the US.  the formencode author seems to be as well.
 
 'internationalization' on most things seems to be limited to swapping
 in text.

There is internationalization and localization. You need to deal with
both.

 many of the checks, such as PlainText allow for only a subset of
 ascii.

Which subset would that be? Your example of é falls well outside of
ASCII.

 anything else trips an error.  short of making everything a unicode
 string (which I aready had done) - i'm specifically wondering how
 people are handling validating different form elements with these
 shortcomings.

Without concrete examples of things that break there is little we can
tell you.

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



Re: FormEncode and International Languages

2009-01-27 Thread Wichert Akkerman

Previously Gustavo Narea wrote:
 On Monday January 26, 2009 23:20:37 Jonathan Vanasco wrote:
  Our project is dealing with a lot of French writers typing things like
  é , which fails many formencode tests.

There is nothing special about the occasional accent in French: French
is much simpler than, for example, Chinese.

 Use UnicodeString instead of String:
 http://www.formencode.org/class-formencode.validators.UnicodeString.html
 
 I don't think the problem will be present on other validators -- at least I 
 guess so.

OneOf can't deal with non-ascii values if I remember correctly. I have
an open ticket in a project related to that.

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



Re: Looking for Pylons speakers

2009-01-27 Thread chris mollis
Trailbender.net uses Postgresql, postgis, and pylons (on EC2), but it's not
really finished yet.  I could talk about our experiences, but you probably
want speakers with finished products or services.

On Mon, Jan 26, 2009 at 8:43 PM, Joshua D. Drake j...@commandprompt.comwrote:


 On Mon, 2009-01-26 at 14:13 -0800, Jonathan Vanasco wrote:
  Josh -
 
  Do you know when the deadline for submissions is?
 

 You got at least a month.

  I'm about to release a Pylons/PG open source project.
  
 --
 PostgreSQL - XMPP: jdr...@jabber.postgresql.org
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


 


--~--~-~--~~~---~--~~
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: State of Auth with Pylons

2009-01-27 Thread Chris Miles

I haven't dealt with this problem either.

I had a quick look at TurboGears 2 to see if they had a solution for  
it in a quickstarted app (they use repoze.who/repoze.what) but they  
don't display an error message for failed logins either.

A session based flash message (as suggested by TJ Ninneman) is  
probably the way to go, but any recommendations from repoze.who  
experts would be handy.

Cheers,
Chris Miles

On 27/01/2009, at 5:42 AM, Tom Longson (nym) wrote:

 Have you managed to deal with the problem of login handlers and error
 messages, that is what happens if a user tries to log in and for
 whatever reason, fails?

 I'm currently using repoze.who, and haven't managed to overcome this
 major point, even though I've discussed it at length with Chris
 McDonough.

 Cheers,
 Tom

 On Fri, Jan 23, 2009 at 5:51 PM, Chris Miles miles.ch...@gmail.com  
 wrote:

 For my first stab at authentication in Pylons I used repoze.who and
 was very satisfied with it.  It is complete (enough for me) but also
 very customisable.  For authorization I just rolled my own, as the
 requirements were extremely 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
-~--~~~~--~~--~--~---



Re: State of Auth with Pylons

2009-01-27 Thread Jorge Vargas

On Tue, Jan 27, 2009 at 7:29 AM, Chris Miles miles.ch...@gmail.com wrote:

 I haven't dealt with this problem either.

 I had a quick look at TurboGears 2 to see if they had a solution for
 it in a quickstarted app (they use repoze.who/repoze.what) but they
 don't display an error message for failed logins either.

actually it does, you probably tried an older version of the package.
keep in mind repoze.what is the newest of all auth layers and it's
code is still in flux. There was a big revamp of the whole thing about
a month ago and it had it's 0.1 final less than a week ago.

 A session based flash message (as suggested by TJ Ninneman) is
 probably the way to go, but any recommendations from repoze.who
 experts would be handy.

This was also discuss in the TG list recently and even though this is
a great thing it's hard for when you need to do caching of the pages.
The current solution turbogears uses is a system with two optional
interchangeable components. You have a cookie based flash (this is a
package created for that purpose) and a session flash (old traditional
TG style flash).

 Cheers,
 Chris Miles

 On 27/01/2009, at 5:42 AM, Tom Longson (nym) wrote:

 Have you managed to deal with the problem of login handlers and error
 messages, that is what happens if a user tries to log in and for
 whatever reason, fails?

 I'm currently using repoze.who, and haven't managed to overcome this
 major point, even though I've discussed it at length with Chris
 McDonough.

 Cheers,
 Tom

 On Fri, Jan 23, 2009 at 5:51 PM, Chris Miles miles.ch...@gmail.com
 wrote:

 For my first stab at authentication in Pylons I used repoze.who and
 was very satisfied with it.  It is complete (enough for me) but also
 very customisable.  For authorization I just rolled my own, as the
 requirements were extremely 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
-~--~~~~--~~--~--~---



Re: State of Auth with Pylons

2009-01-27 Thread TJ Ninneman


 This was also discuss in the TG list recently and even though this is
 a great thing it's hard for when you need to do caching of the pages.
 The current solution turbogears uses is a system with two optional
 interchangeable components. You have a cookie based flash (this is a
 package created for that purpose) and a session flash (old traditional
 TG style flash).

Does the cookie get set within a custom Challenger plugin or within  
the Authenticator plugin?

TJ

--~--~-~--~~~---~--~~
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: State of Auth with Pylons

2009-01-27 Thread Jorge Vargas

On Tue, Jan 27, 2009 at 10:16 AM, TJ Ninneman t...@twopeasinabucket.com wrote:


 This was also discuss in the TG list recently and even though this is
 a great thing it's hard for when you need to do caching of the pages.
 The current solution turbogears uses is a system with two optional
 interchangeable components. You have a cookie based flash (this is a
 package created for that purpose) and a session flash (old traditional
 TG style flash).

 Does the cookie get set within a custom Challenger plugin or within
 the Authenticator plugin?

neither, the webflash package is very new, and very small go check it
out, it's on pypi

--~--~-~--~~~---~--~~
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: State of Auth with Pylons

2009-01-27 Thread Gustavo Narea

Hello,

On Tuesday January 27, 2009 15:16:36 TJ Ninneman wrote:
 Does the cookie get set within a custom Challenger plugin or within  
 the Authenticator plugin?


It's the way TurboGears itself deals with so-called flash messages, it's not 
specific to authentication messages.

But I'd subclass the authenticator to flash the message you want (e.g., login 
succeeded, login failed).

This conversation reminds me that logged in messages are not supported yet in 
TG2. Going to solve it now...

Cheers.
-- 
Gustavo Narea http://gustavonarea.net/.

Get rid of unethical constraints! Get freedomware:
http://www.getgnulinux.org/

--~--~-~--~~~---~--~~
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: State of Auth with Pylons

2009-01-27 Thread TJ Ninneman


On Jan 27, 2009, at 8:50 AM, Jorge Vargas wrote:


 On Tue, Jan 27, 2009 at 10:16 AM, TJ Ninneman  
 t...@twopeasinabucket.com wrote:


 This was also discuss in the TG list recently and even though this  
 is
 a great thing it's hard for when you need to do caching of the  
 pages.
 The current solution turbogears uses is a system with two optional
 interchangeable components. You have a cookie based flash (this is a
 package created for that purpose) and a session flash (old  
 traditional
 TG style flash).

 Does the cookie get set within a custom Challenger plugin or within
 the Authenticator plugin?

 neither, the webflash package is very new, and very small go check it
 out, it's on pypi

Wonderful!  You know how many times I've rebuilt this same thing on  
different projects?

TJ

--~--~-~--~~~---~--~~
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: Looking for Pylons speakers

2009-01-27 Thread Joshua D. Drake

On Tue, 2009-01-27 at 06:02 -0500, chris mollis wrote:
 Trailbender.net uses Postgresql, postgis, and pylons (on EC2), but
 it's not really finished yet.  I could talk about our experiences, but
 you probably want speakers with finished products or services.
 

Not necessarily. Software is never finished, you know that :). You have
some significant buzzword compliance up there:

PostgreSQL (nobody should be using anything different anyway)
Postgis (GIS is the rage)
Pylons (well duh)
EC2... that's the cloud man. 

I think a talk or even mini-tutorial that breaks out specific problems
that were found and solved within the entire package would be
incredible.

Sincerely,

Joshua D. Drake

-- 
PostgreSQL - XMPP: jdr...@jabber.postgresql.org
   Consulting, Development, Support, Training
   503-667-4564 - http://www.commandprompt.com/
   The PostgreSQL Company, serving since 1997


--~--~-~--~~~---~--~~
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: Is Django more popular than Pylons?

2009-01-27 Thread Akira Kitada

Just a few questions.

 I hate to pass the buck, but this is Python's fault for not having
 reliable package management built in.  There's nothing Pylons can do
 about it except switch to another programming language.

What programming language has a reliable package management system built in?
Why do you think distutils is not reliable?

Isn't it enough to use the package management systen you system provides
when you need complete and rigorous one?

--~--~-~--~~~---~--~~
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: Is Django more popular than Pylons?

2009-01-27 Thread Mike Orr

On Tue, Jan 27, 2009 at 1:40 PM, Akira Kitada akit...@gmail.com wrote:

 Just a few questions.

 I hate to pass the buck, but this is Python's fault for not having
 reliable package management built in.  There's nothing Pylons can do
 about it except switch to another programming language.

 What programming language has a reliable package management system built in?
 Why do you think distutils is not reliable?

 Isn't it enough to use the package management systen you system provides
 when you need complete and rigorous one?

That's what Guido says, and it's why we're at an impasse.  Distutils
is fine if you just need to download one or two packages and python
setup.py install them.  But that doesn't scale when a package has a
dozen dependencies that recursively have dependencies.  Without
Setuptools, Python and TurboGears couldn't exist, and Zope and Twisted
would not have been able to split themselves into several packages.
People coming to Python from Perl and Ruby expect to be able to just
run a command to download and install a package.  That problem was
solved ten years ago, so why does Python still not have it standard?

If Setuptools and Virtualenv or the equivalent were built into Python,
you could trust that every computer that has successfully installed
Python can install packages and make virtual environments the same
way.  That would eliminate 2/3 of the problems users have when
installing Pylons, and the subsequent need to explain the problems and
workarounds in the installation docs.  And the problems are different
on Windows vs Mac vs Linux, and App Engine adds another dimension.  At
work people say, Half the trouble of Pylons is installing it, and I
often have to help them install it in person because otherwise they
get stuck at some error message and have no idea what to do.

-- 
Mike Orr sluggos...@gmail.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: Turbogears 2 keywords Pylons

2009-01-27 Thread Bernard Rankin




 
 could you please not post the same question so many times? you just
 posted this twice to the TG list. This issue has nothing to do with
 pylons so it's irrelevant here.


Sorry about that..  the multi-post was unintentional... I did not look like the 
first two message went through  


Again, I'm not very clear on how all these fit together... I thought this was 
the correct location for Paster related questions.  (I realize that TG2 != 
Paster, but the whole name collision thing would have been an issue for the 
larger Paster community.)


  


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



moving logic from controller to model

2009-01-27 Thread John Brennan

All the documentation I've found (pylons web site, examples, etc) tell
the developer to put all this business logic in the controller and
just setup a flimsy old model with the pass keyword.  I myself did
the same when first learning pylons.  As my app grew, so did my needs.

I'm trying encapulate all data stuff in the model.  For example, I
have a Book object so it would have methods like get, get_all, recent,
etc.  Those all work fine, but the problem occurs when trying to
create a new Book object.


/models/book.py:
class Book(object):
def get_all(self):
query = meta.Session.query(Book).filter_by(user_id=1)
return query.all()
def save(self):
meta.Session.save_or_update(self)
meta.Session.commit()


/models/__init__.py:
def init_model(engine):

Setup the model.
This gets called by lib.app_globals

print Initializing model...
sm = orm.sessionmaker(autoflush=True, transactional=True,
bind=engine)
meta.engine = engine
meta.Session = orm.scoped_session(sm)



Here, my get_all() method works like a charm.  BUT the save() method
gives me this error:
sqlalchemy.exceptions.InvalidRequestError: Class 'type' entity name
'None' has no mapper associated with it

I can see that maybe the model can't save itself and instead the
session should be saving it.  But how do I go about doing that using
this modular structure?

(the suggestion here didn't work for me:
http://groups.google.com/group/pylons-discuss/browse_thread/thread/6ff8f5365414da73/bf384c1d96ea87bd?lnk=gstq=session+save+in+model+class#bf384c1d96ea87bd)
[I am running Pylons 0.9.7 with SQLAlchemy 0.4.4]



Thanks!
--~--~-~--~~~---~--~~
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: moving logic from controller to model

2009-01-27 Thread Ross Vandegrift

On Tue, Jan 27, 2009 at 05:42:48PM -0800, John Brennan wrote:
 I'm trying encapulate all data stuff in the model.  For example, I
 have a Book object so it would have methods like get, get_all, recent,
 etc.  Those all work fine, but the problem occurs when trying to
 create a new Book object.
 
 
 /models/book.py:
 class Book(object):
 def get_all(self):
 query = meta.Session.query(Book).filter_by(user_id=1)
 return query.all()
 def save(self):
 meta.Session.save_or_update(self)
 meta.Session.commit()

[snip]

 I can see that maybe the model can't save itself and instead the
 session should be saving it.  But how do I go about doing that using
 this modular structure?

SA treats your model object (ie, the class that encapsulates the logic
of your application) separately from the Session (ie, the class that
encapsulates information on how to save and restore persistent data
for object instances).

I think of it like this: a Book object should keep properties about
itself - the title, author, publication data, editon, etc.  But a Book
is not the kind of object that saves and loads things to a database. [1]

The SA Session is the kind of object that saves and loads things from
a database.  You setup mappers so that SA knows what to save.  I would
implement your object like this:



class Book(object):
def __init__(self, title, author):
self.title = title
self.author = author
self.bookmark = None

def bookmark(self, pageno):
self.bookmark = pageno

There's no database code in there, just Book code.  Here's the
database table information:

import sqlalchemy as sa
book_table = sa.Table(Column('id', sa.Integer, primary_key=True),
  Column('title', sa.Unicode()),
  Column('author', sa.Unicode()))

Finally, you need an ORM mapper to link the two up:

import sqlalchemy.orm as orm
book_mapper = orm.mapper(Book, book_table)

Then, in the pylons controller actions, I would do things like this:

class SomeController(BaseController):
def action(self):
q = meta.Session.query(model.Book)
c.paine = q.filter_by(author=Thomas Paine)
c.jefferson = q.filter_by(author=Thomas Jefferson)
return render(/showbooks.mako)

(where showbook.mako iterates over those books and displays some
interesting information about what's in the database).


[1] At least, I have never seen such a book :)

-- 
Ross Vandegrift
r...@kallisti.us

If the fight gets hot, the songs get hotter.  If the going gets tough,
the songs get tougher.
--Woody Guthrie

--~--~-~--~~~---~--~~
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: moving logic from controller to model

2009-01-27 Thread TJ Ninneman


On Jan 27, 2009, at 8:02 PM, Ross Vandegrift wrote:

 SA treats your model object (ie, the class that encapsulates the logic
 of your application) separately from the Session (ie, the class that
 encapsulates information on how to save and restore persistent data
 for object instances).

 I think of it like this: a Book object should keep properties about
 itself - the title, author, publication data, editon, etc.  But a Book
 is not the kind of object that saves and loads things to a database.  
 [1]



Well put, Russ.  A Book() object represents ONE book, not a way to go  
fetch books from somewhere else.  Standard OO rules apply here: in  
general, the methods attached to Book() should affect that books  
attributes and only that books attributes.

And truth be told, it would really be a waste of your time trying to  
make it do otherwise.  SQLAlchemy has a wonderfully expressive query  
language/API for you to use:

Your get_all() is just a one-liner:
model.meta.Session.query(Book).all()

Your get() method already exists as well:
model.meta.Session.query(Book).get(2543)  - primary key

Any other requirements are fullfilled by the filter/filter_by  
functions Russ demonstrated.

When coding your to-be mapped classes, always code them (or at least  
try damn hard) so that they could stand all alone without SQLAlchemy.   
You should be able to instantiate them, change attribute values and  
call all the methods of that object.  It seems like 80%+ of the time,  
I'm just writing Python properties in those classes to do data hiding/ 
manipulation anyway.

TJ




--~--~-~--~~~---~--~~
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: moving logic from controller to model

2009-01-27 Thread Mike Orr

On Tue, Jan 27, 2009 at 6:02 PM, Ross Vandegrift r...@kallisti.us wrote:

 class Book(object):
def __init__(self, title, author):
self.title = title
self.author = author
self.bookmark = None

def bookmark(self, pageno):
self.bookmark = pageno

Any normal methods you define in this class will operate on a single
book record, and it should probably not access the Session directly.
If you want a method that operates on multiple records, you can use a
class method:


@classmethod
def get_all(class_):
q = meta.Session.query(class_).filter_by(user_id=1)
return q.all()

books = model.Book.get_all()

However, I would return the query object rather than a list, so that
the controller or template can call any of its methods it wants (.all,
.count, etc).  That provides a nice generic API for all these
operations.  However, by exposing the query, you're also tying the
controller/template to SQLAlchemy.  This only matters if you think you
might switch to another database system later.

Creating objects I normally do directly in the controller, and same
for deleting or modifying.  However, you could make class methods for
these too.  Or functions in the model.

You can also make a base class with common methods for your ORM
classes.  One of my applications has this in the meta module:


class ORMClass(object):
Base class for all ORM classes.

_id_attribute = None

@classmethod
def query(class_):
return Session.query(class_)

@classmethod
def get(class_, id):
return class_.query().get(id)

def __repr__(self):
if self._id_attribute:
value = getattr(self, self._id_attribute)
if isinstance(value, basestring):
id_str =  '%s' % value
elif isinstance(value, (int, long)):
id_str =  #%s % value
elif value is None:
id_str =  ''
else:
id_str =  %s % value
else:
id_str = 
return %s%s % (self.__class__.__name__, id_str)


But sometimes I wonder whether such trivial magic as .query and .get
is worth it.

-- 
Mike Orr sluggos...@gmail.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: State of Auth with Pylons

2009-01-27 Thread Chris Miles


On 24/01/2009, at 2:02 PM, Mike Orr wrote:

 On Fri, Jan 23, 2009 at 5:51 PM, Chris Miles miles.ch...@gmail.com  
 wrote:

 I'd like to see the Pylons quickstart template offer an
 authentication/authorization solution as an option, in the same way
 that it offers a DB/ORM solution (SQLAlchemy) so the user can get
 started quickly.  Many people will be happy to take the suggested/
 recommended option so they can get on with their work.  Advanced  
 users
 who know what they want can take it or leave it.  It is certainly not
 hard to plug in WSGI auth/auth to a Pylons app, but offering a
 suggested solution via the template will make some people's lives  
 that
 much easier.

 This may not be a bad idea at this point.  Would you like to make a
 Trac ticket with a suggested configuration, and we'll see if the
 Pylons developers are comfortable with it.

Guys, I'm trying to create a ticket for this (with a patch containing  
my suggested implementation) at http://pylonshq.com/project/pylonshq/newticket 
  but am getting a 404 error from ticket preview.

Looks like the new site w/ Trac integration is still a WIP  
(Contributing and Contact Administrators don't yet link anywhere,  
for example). Let me know if you need any help sorting it out.

Cheers,
Chris Miles


--~--~-~--~~~---~--~~
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: Is Django more popular than Pylons?

2009-01-27 Thread Eric Lemoine

Hi

I agree that it'd be good to have virtualenv shipped with Python. I
wish I did have to tell my Pylons application users to first download
virtualenv, dearchive it, extract virtualenv.py, etc.

Cheers,

Eric

2009/1/27, Mike Orr sluggos...@gmail.com:

 On Tue, Jan 27, 2009 at 1:40 PM, Akira Kitada akit...@gmail.com wrote:

 Just a few questions.

 I hate to pass the buck, but this is Python's fault for not having
 reliable package management built in.  There's nothing Pylons can do
 about it except switch to another programming language.

 What programming language has a reliable package management system built
 in?
 Why do you think distutils is not reliable?

 Isn't it enough to use the package management systen you system provides
 when you need complete and rigorous one?

 That's what Guido says, and it's why we're at an impasse.  Distutils
 is fine if you just need to download one or two packages and python
 setup.py install them.  But that doesn't scale when a package has a
 dozen dependencies that recursively have dependencies.  Without
 Setuptools, Python and TurboGears couldn't exist, and Zope and Twisted
 would not have been able to split themselves into several packages.
 People coming to Python from Perl and Ruby expect to be able to just
 run a command to download and install a package.  That problem was
 solved ten years ago, so why does Python still not have it standard?

 If Setuptools and Virtualenv or the equivalent were built into Python,
 you could trust that every computer that has successfully installed
 Python can install packages and make virtual environments the same
 way.  That would eliminate 2/3 of the problems users have when
 installing Pylons, and the subsequent need to explain the problems and
 workarounds in the installation docs.  And the problems are different
 on Windows vs Mac vs Linux, and App Engine adds another dimension.  At
 work people say, Half the trouble of Pylons is installing it, and I
 often have to help them install it in person because otherwise they
 get stuck at some error message and have no idea what to do.

 --
 Mike Orr sluggos...@gmail.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: Is Django more popular than Pylons?

2009-01-27 Thread Noah Gift

.  And the problems are different
 on Windows vs Mac vs Linux, and App Engine adds another dimension.  At
 work people say, Half the trouble of Pylons is installing it, and I
 often have to help them install it in person because otherwise they
 get stuck at some error message and have no idea what to do.

Not to belabor the point, but couldn't this be automatically tested on
a mac buildbot with a linux and windows virtual machine?  You
easy_install pylons, which in a sense is a build, and then run tests,
which a few standard configurations?  Maybe hardware could get donated
for this.



 --
 Mike Orr sluggos...@gmail.com

 




-- 
Cheers,

Noah

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