authentication docs

2012-09-14 Thread jdob


I'm going through the wiki tutorial (SQLAlchemy + URL Dispatch) 
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/index.html.
 On the page describing authentication, line 7 of the code example 
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-views
  
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-viewsunder
 Adding Login and Logout Views 
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-views
 has the comment: # never use the login form itself as came_from but I don't 
see any indication about why.

Can anyone explain why?  Thanks.

-- 
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/-/HpoCn3BeEo8J.
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: How to build a website with multiply subdomains?

2012-09-14 Thread Christian Benke


 These three websites need to share the same models and templates. I just 
 created three pyramid projects and copy all models and templates to each 
 one's folders. that's stupid. Is there any better practices for this?


maybe this answers your question? 
http://stackoverflow.com/questions/7607807/multiple-domains-and-subdomains-on-a-single-pyramid-instance
 

-- 
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/-/a0v8lcBKSFMJ.
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: How to build a website with multiply subdomains?

2012-09-14 Thread Arndt Droullier
2012/9/14 Christian Benke benkoka...@gmail.com

 These three websites need to share the same models and templates. I just
 created three pyramid projects and copy all models and templates to each
 one's folders. that's stupid. Is there any better practices for this?


 maybe this answers your question?
 http://stackoverflow.com/questions/7607807/multiple-domains-and-subdomains-on-a-single-pyramid-instance


 A pyramid application is just a python package. You can run any number of
wsgi applications from the same package/directory.
All you have to do is to create three separate paste ini files and use them
as pserve-parameter.

-- 
DV Electric / Arndt Droullier / www.dvelectric.de

-- 
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 specific FormEncode bugs

2012-09-14 Thread Chris Lambacher
Hi,

There are some bugs in the issue tracker that seem to directly tied to how
Pylons uses FormEncode if you are still using Pylons please comment on them.

The specific bugs are:
https://github.com/formencode/formencode/issues/4
https://github.com/formencode/formencode/issues/9
https://github.com/formencode/formencode/issues/10

#4 specifically looks like htmlfill is being used incorrectly. htmlfill is
designed to be run over the html of the form and not the whole response,
which is why I think this is happening. Other problems that crop when you
have multiple forms on a page.

-Chris

-- 
Christopher Lambacher
ch...@kateandchris.net

-- 
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: authentication docs

2012-09-14 Thread Whit Morriss
just a guess, endless loops make for bad user experience?

-w

On Sep 14, 2012, at 1:27 AM, jdob 
dobson...@gmail.commailto:dobson...@gmail.com
 wrote:


I'm going through the wiki tutorial (SQLAlchemy + URL 
Dispatch)http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/index.html.
 On the page describing authentication, line 7 of the code 
examplehttp://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-views
 
http://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-views
 under Adding Login and Logout 
Viewshttp://docs.pylonsproject.org/projects/pyramid/en/1.3-branch/tutorials/wiki2/authorization.html#adding-login-and-logout-views
 has the comment: # never use the login form itself as came_from but I don't 
see any indication about why.

Can anyone explain why?  Thanks.

--
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/-/HpoCn3BeEo8J.
To post to this group, send email to 
pylons-discuss@googlegroups.commailto:pylons-discuss@googlegroups.com.
To unsubscribe from this group, send email to 
pylons-discuss+unsubscr...@googlegroups.commailto:pylons-discuss+unsubscr...@googlegroups.com.
For more options, visit this group at 
http://groups.google.com/group/pylons-discuss?hl=en.

-- 
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: Logging, again...

2012-09-14 Thread Philip Jenvey

On Sep 11, 2012, at 3:41 PM, Vlad K. wrote:

 
 Hi all,
 
 I'm having a bit of an issue with logging. I did this (a trick I picked up 
 from a site to enable logging under uwsgi):
 
 
 __init__.py
 
 def main(global_config, **settings):
  Main WSGI application.
 
 logging.config.fileConfig(settings[logging.config])
 
 
 
 development.ini
 
 logging.config = %(here)s/development.ini
 
 ...
 
 
 # Begin logging configuration
 
 [loggers]
 keys = root,sqlalchemy
 
 [handlers]
 keys = console
 
 [formatters]
 keys = generic
 
 [logger_root]
 level = DEBUG
 handlers = console
 
 [logger_sqlalchemy]
 level = INFO
 handlers =
 qualname = sqlalchemy.engine
 # level = INFO logs SQL queries.
 # level = DEBUG logs SQL queries and results.
 # level = WARN logs neither.  (Recommended for production systems.)
 
 [handler_console]
 class = StreamHandler
 args = (sys.stderr,)
 level = NOTSET
 formatter = generic
 
 [formatter_generic]
 format = %(asctime)s %(levelname)-5.5s [%(name)s][%(threadName)s] %(message)s
 
 # End logging configuration
 
 Now, if I include logging.config.fileConfig() line in __init__ I have to 
 specifically enable loggers for namespaces in development.ini, the root 
 logger won't catch all. For example, I've disabled debugtoolbar in dev, and 
 in case of exceptions I get nothing on the console unless I add a 
 [logger_waitress] section (with logger key set, qualname, etc...).
 
 If I remove that line (basically, disable logging configuration), logging 
 under Waitress shows root logger catching all (that is not overriden).
 
 
 What am I doing wrong?

It's not apparent to me what's wrong. With a root logger set to DEBUG you 
should probably be seeing those messages. You may want to try using the 
logging_tree package as a visual aid:

http://pypi.python.org/pypi/logging_tree

--
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: authentication docs

2012-09-14 Thread jdob
Ah ok got it.  Somehow I missed the part about redirecting to came_from.  
Thanks.

On Friday, September 14, 2012 8:07:34 AM UTC-7, Whit Morriss wrote:

  or rather, on successful login, the form will redirect you to 
 came_from and if you hit login and are logged in and redirect to login, 
 you will rinse and repeat until http hits a limit.

  -w

  

-- 
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/-/HnuwUkzc2LoJ.
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.