Re: pylons apps?

2006-06-07 Thread Damjan
Well, the packages I've made (DjangoPaste and CherryPaste) have frequently broken due to upstream changes, so in the specific case of TG and Django it's not a stable situation. I haven't revisited Django since magic-removal went live; hopefully it's actually better as a result. Ideally

Re: session problem in 0.92dev

2006-08-28 Thread Damjan
has_key will be removed in Python3000, use if 'client_id' in session: instead --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

Re: PythonOption SCRIPT_NAME /

2006-09-05 Thread Damjan
And calls to root, for example http://www.example.com; were continually redirected If it's running at the root URL (/), then you can leave off SCRIPT_NAME entirely. Yes, bacause in that case SCRIPT_NAME actually is an empty string. Probably PythonOption SCRIPT_NAME would work Also,

Re: Upload Forget CMS

2006-11-07 Thread Damjan
Maybe you'd like to use CouchDB http://www.couchdbwiki.com/index.php?title=Basic_Concepts seems interesting --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email

Re: Using Durus with Pylons

2006-12-16 Thread Damjan
I finally ended up putting the connection in MyController.__before__(). That way it's created only in controllers that actually use the database,and it's one less module to modify. But I still want to see if it's possible to use one connection for several requests. The usual way is to use

Re: comments on Unicode document

2006-12-18 Thread Damjan
http://pylonshq.com/project/pylonshq/browser/Pylons/trunk/docs/internationalization.txt Wow, great document This is a lot of non-Pylons-specific work! And this should really be added to the Python wiki, too... and eventually should enter the standard Python documentation. My notes:

Re: comments on Unicode document

2006-12-18 Thread Damjan
For example MySQL's Unicode documentation is here Also note that you need to consider both the encoding of the database and the encoding used by the database driver. If you're using MySQL together with SQLAlchemy, see the following, as there are some bugs in MySQLdb that you'll need

Re: Using Durus with Pylons

2006-12-18 Thread Damjan
Actually this is what I've used to create per thread durus connections and cache them: from durus.client_storage import ClientStorage from durus.connection import Connection import threading def connect(address): tls = threading.local() try: connection = tls.connection except:

Re: comments on Unicode document

2006-12-19 Thread Damjan
Are we on the same page, or am I still lost? Not lost at all :) Except I'd prefer if all Python API's would be unicode aware, and would not encode/decode until it's utmost necessary. I think it would be nice if the Python DB-API is reviewed and make unicode a requirement (for quieries and

Re: Using Durus with Pylons

2006-12-19 Thread Damjan
And now that I re-read it again I see it's wrong. if 'tls' would've been a global variable it would made some sense --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group,

Re: UTF-8 ... help

2007-01-14 Thread Damjan
UTF-8 is not ASCII. ASCII is a 7-bit charset (0-127), UTF-8 is a 8-bit, multibyte, NULL byte clean, encoding of Unicode. Unicode is not multi-byte strings. Unicode is the standard that defines which codepoint (number) is which glyph (character). There are different ways to represent Unicode in

Re: More on unicode

2007-02-02 Thread Damjan
While on the topic ... can someone take a look at http://routes.groovie.org/trac/routes/ticket/37 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this group, send email to

Re: More on unicode

2007-02-02 Thread Damjan
Thanks, it works... I also notice that with this version of Routes 1.6.3dev-r325 controller arguments are unicode now. for example, I have def show(self, pagename): ... pagename was a byte string before, but now it's unicode... which is great.

Routes question

2007-02-04 Thread Damjan
I really liked to be able to define a route like this: map.connect('*pagename;:action', controller='page') but it seems unpossible (according to http://routes.groovie.org/manual.html#wildcard-limitations-and-gotchas) ... actually the main problem is because action='index' is defined by default

Re: More on unicode

2007-02-04 Thread Damjan
What I want is to pick up the languages supported by the browser in the order in which they are specified by the browser. It would appear that Firefox changes the sequence of the languages based on the currently selected locale - at least my copy does. Most probably ... since that string

Request: tutorial for ToscaWidgets :)

2007-02-05 Thread Damjan
I've created this Genshi markup for a project of mine http://groups.google.com/group/pylons-discuss/web/edit.html ... now I have this tagging widget there that works with Mochikit. It shows the tags associated with a page, and allows for AJAX adding and removing of the tags (with all the bells

Re: Request: tutorial for ToscaWidgets :)

2007-02-07 Thread Damjan
It would be nice if those parameters could be passed to a constructor in a single js call, that would make wraping it in a TW quite easy and it would allow having multiple taggers in the same page. So you mean like more object oriented javascript?... I've never done that, but I can try.

Re: Adding Genshi Template Engine (environment.py vs middleware.py)

2007-02-17 Thread Damjan
# Setup Genshi(only) Template Engine Implying that mix'n'match isn't supported? That's copy/paste from the recipe I've found... I don't use other templates so I've not even tried mixing them. So I don't imply anything. --~--~-~--~~~---~--~~ You received

Re: Adding Genshi Template Engine (environment.py vs middleware.py)

2007-02-17 Thread Damjan
I only thought that it might be a bit premature to hard-code it into the project templates as the only engine. Unless Genshi is now part of the standard Pylons easy_install? Which is what I should have written in the first place. Aha I understand what you mean... No, I don't propose to

setting a cookie whether a redirect happens or not - part 2

2007-02-17 Thread Damjan
There was a discussion recently about this on this list but also on IRC etc. I have two sollutions, one was to make a custom redirect response that then I could modify. The other is to modify Pylons so that instead of re-raiseing the HTTPException in WSGIController.__call__ so that the

Re: problems with paster serve reload

2007-02-19 Thread Damjan
I've been getting this on Gentoo ever since I started using Pylons two months ago, on two different versions of Pylons and Paste (both Python 2.4.x). Only I don't have to modify any files; merely running paster serve --reload and ctrl-c is enough to leave threads running which have to be

Re: Routes generates bad URLs with args containing spaces

2007-03-16 Thread Damjan
Isn't + and %20 considered the same in HTTP?? On Mar 17, 12:12 am, Mike Orr [EMAIL PROTECTED] wrote: I have a bunch of images with spaces in the filenames. I need to embed the filename in the URL with the proper escaping, so: 6001/1355/SHELLNAIRN08OCT05 _24_.jpg should be:

Re: Enable SSL only for selected controllers

2007-07-23 Thread Damjan
You'll set your app with both a SSL and non-SSL server. Then in your login form you'll set https:// as the POST action. Even better if the login form itself is served as https:// - you can do that by changing the Login url in the HTML but also you can check in the controller that shows the login

Re: Sessions - database or filesystem

2007-10-19 Thread Damjan
If you're not clustered, I see no reason to use the filesystem session as it'll be faster. no reason to use or not to use?? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups pylons-discuss group. To post to this

Re: Mysql database server failover

2007-11-08 Thread Damjan
By master-master you mean each database updates the other when a change comes in? How did you structure that? http://www.howtoforge.com/mysql_master_master_replication MySQL master-master is kind of like bidirectional master-slave. This is supported in version 5.0 and above. In previous

Re: Routes: Subdomain won't work with referers (bug?)

2007-11-16 Thread Damjan
If you plan to run the *same* web application for different entities - thus you need different data (icons, templates, db...) in your app - maybe it's better to check for environ['HOST'] in your controllers explicitly, and act acordingly? After a while, I'm sure a pattern will emerge so you

Re: Pylons + mod_wsgi Oracle

2008-02-13 Thread Damjan
AFAIK you'll have to start httpd with env - ORACLE_HOME=... /usr/sbin/httpd --~--~-~--~~~---~--~~ 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

Re: Routes 1.8 Release

2008-04-07 Thread Damjan
I don't know the real reason behind this change but for me it feels more natural and elegant to have clean URLs with slashes than using any other caracters =) well the difference is between /some_resource;edit /some_resource;preview etc. and /some_resource/edit now /edit looks like an

Re: Routes 1.8 Release

2008-04-07 Thread Damjan
maybe because of this: http://www.issociate.de/board/post/11276/Forwarding_URL_with_semicolon.html although I don't think Apache is doing the correct thing there... I'll check that later --~--~-~--~~~---~--~~ You received this message because you are subscribed to

Re: Running Pylons with PHP

2008-05-12 Thread Damjan
 But named virtual hosts won't work if you're using HTTPS. Well, there's a patch for Apache to support that, and nginx also does support the TLS extension for single ip based HTTPS. Firefox 2.0 and IE 7.0 I htink also support this. (the feature is named TLS SNI.. https://sni.velox.ch/ )

Re: Pylons and memory use

2008-06-08 Thread Damjan
cat /proc/pid/status will give you a lot of information about memory usage. ex: ... VmPeak: 2316 kB VmSize: 2212 kB VmLck: 0 kB VmHWM: 940 kB VmRSS: 936 kB VmData: 164 kB VmStk:84 kB VmExe:12 kB VmLib: 1876 kB VmPTE:20 kB ... On Jun

Re: mod_wsgi does not check for changed files?

2008-06-27 Thread Damjan
http://code.google.com/p/modwsgi/wiki/ReloadingSourceCode On Jun 27, 9:53 pm, webwurst [EMAIL PROTECTED] wrote: Hi! If i start a pylons project with paster i can add the parameter -- relaod, so changes to the source code are reflected directly. But i'm using mod_wsdi now and i have to

Re: Is Django more popular than Pylons?

2009-01-28 Thread Damjan
In production, I've gone to always using virtualenvs. Python 2.6 now supports $PYTHONUSERBASE, just set it to a directory (doesn't need to exist), for example: export PYTHONUSERBASE=$HOME/mydev/ pip.py install FormAlchemy Now I do have in ~/.pydistutils.cfg [install] user=True It's similar

Re: Is Django more popular than Pylons?

2009-01-29 Thread Damjan
Oh, this is the same as the per-user install directory? http://www.python.org/dev/peps/pep-0370/ I thought there could be only one site-packages per user, not multiple ones per application. yes, that's the feature, $PYTHONUSERBASE controls which environment you are using, so you can have

Re: Is Django more popular than Pylons?

2009-01-30 Thread Damjan
Damjan, and does ipython works from $PYTHONUSERBASE? because it doesn't works on virtualenv. If if works then would be another great advantage :) Yes it works. I've just installed the distro version of ipython, and it can import the modules in my USERBASE, no problem. So you don't even need

Re: Source encoding issues

2009-01-30 Thread Damjan
On Jan 30, 11:36 am, Domen Kožar ielect...@gmail.com wrote: I somewhat figured out that my u'strings' get encoded to latin, even though utf-8 is set as OS locale, vim encoding and python source encoding. After fiddling around, I got that far:http://paste.pocoo.org/show/101978/ Any idea

Re: Source encoding issues

2009-01-31 Thread Damjan
I know about the pep and how python source files are encoded, but the interactive shell is something completely different. I wonder on what local env variable does shell depend. Since I have all of them either sl_SI.UTF8 or en_GB.UTF-8. The Python interactive shell depends on the locale

Re: installation has NEVER worked on the first try in two years of using Pylons

2009-04-09 Thread Damjan
I get frustrated every time I setup a new virtualENV as I forgot that something always breaks.   For those using Python 2.6*, I'd like to see how much better/worse this sollution is: # starting from scratch, a clean slate: wget https://svn.openplans.org/svn/pip/trunk/pip.py chmod +x pip.py

Re: How to run pylons (paster) without enter certificate password ?

2009-04-09 Thread Damjan
Is it a simple way to run daemon (paster) using certificate? Before every start of paster I have to enter my 'certificate password'. Maybe is it a parameter to use it in command line? are you talking about a SSL certificate? you can easyly save a non- encripted private key with the openssl

Re: Authkit vs repoze.who for openid

2009-07-18 Thread Damjan
SqlAlchemy is not requirement for OpenID but you still need SQL backend for OpenID. I believe that's only limitation of python-openid library which might be already addressed and I am not aware about it. My implementation works properly with MySQL only. I know how to fix SQLite backend but

Re: Authkit vs repoze.who for openid

2009-07-19 Thread Damjan
2) Your server should remember somehow who and when initiated OpenID request. So it create OpenID session and saves it to database (OpenID session usually is encoded into return URL); I can remember that in the http session (which could be Beakers secure cookie)

Re: mod_wsgi and auth_kit: Login doesn't work

2009-07-20 Thread Damjan
[Fri Jul 17 19:01:43 2009] [error] [client 192.168.1.100] TypeError: sequence of string values expected, value of type literal found, referer:http://192.168.1.100/ This seems like the common error in middleware to not return strings but probably a number in your case. You could try to wrap

Re: Counting feed subscribers

2009-11-24 Thread Damjan
The only thing I can think of is to put a random number in a query parameter when generating feed URLs.  Then the number of active feeds each month would be the count of unique feed numbers. Or is there a better way? route them through feedburner? :) -- You received this message because you