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

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 ver

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 coul

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-06 Thread Damjan
> Previously, Routes used a ';' mark for an action in map.resource, like: > /comments/4;preview > > With 1.8, its now: > /comments/4/preview What exactly is the reason for this? I'm asking since ";" seemed like a nice separator, and I've used it in some other projects. --~--~-~--~~---

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 adi

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: Routes 1.8 Release

2008-04-07 Thread Damjan
And reading the rfc1738.txt seems to allow it: ; HTTP httpurl= "http://"; hostport [ "/" hpath [ "?" search ]] hpath = hsegment *[ "/" hsegment ] hsegment = *[ uchar | ";" | ":" | "@" | "&" | "=" ] search = *[ uchar | ";" | ":" | "@" | "&" | "=" ] --~--~-~

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//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 7, 7:

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: Severe security vulnerability?: ajax shell in traceback

2008-07-07 Thread Damjan
> > Hi all.  I think a better solution is for devlopment.ini to listen > > only on localhost by default.  I've opened a ticket for > > it:http://pylonshq.com/project/pylonshq/ticket/483 > > That's a great idea -- and should be implemented! > > However, just to play devil's advocate - if you're t

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 t

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 ha

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.

Re: Source encoding issues

2009-01-30 Thread Damjan
On Jan 30, 11:36 am, Domen Kožar 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 what could trigg

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 local

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 e

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 b

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: Authkit vs repoze.who for openid

2009-07-19 Thread Damjan
> > I guess that's not the most secure thing to do but if you want you could > > try to write your own OpenID implementation. It might be possible that I > > have oversimplified everything and there are more steps to make OpenID > > secure. I really doubt that OpenID authors were that stupid so th

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: Pylons, then Django, now back to Pylons

2006-05-19 Thread Damjan
> What do you think of integrating a mod_python handler in Pylons to have > it even easier "plug and play" ? If I'm not mistaken you can install a pylons app in any WSGI server, so just follow this info how to install WSGI applications in mod_python: http://modpython.org/FAQ/faqw.py?query=wsgi&qu

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: mod_python and paste apps

2006-07-13 Thread Damjan
I have one comment about the part that says: """Make sure that you specify the correct SCRIPT_NAME which should be the name of your Pylons Project and that your PythonPath points to the correct directory.""" SCRIPT_NAME actually should be the location under which Apache executes the WSGI applica

Re: myghty and encoding

2006-07-19 Thread Damjan
> Yeah, I'm having the same problem sometimes. The problem lies in the > Myghty templating engine's crummy support for unicode. Unfortunately, I > looked into it a bit, and it looks like there aren't really any > templating engines with good unicode support. Kid only works with unicode, so I thin

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 pylons-discuss@googlegroup

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

Re: pylons+apache+cgi

2006-09-05 Thread Damjan
> i am trying to get a remote machine working with pylons, apache and > ssl. limitations that apply: only shell and https access, no > fastcgi/mod_python. > > apache is up, cgi and mod_rewrite already tested and working. my > pylons-app seems to be working, too (tested on localhost with w3m and >

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: Upload & Forget "CMS"

2006-11-08 Thread Damjan
The api is REST-full XML over HTTP .. you generally don't need special bindings, but maybe some apstraction would be helpfull. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this

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

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: ht

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

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 res

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, se

Re: Can Pylons be more aggressive ?

2007-01-04 Thread Damjan
1. Hosting possibilities - not to many... - Why not mail various hosting companies that theoretically support Pylons (like they give ssh+server+mod_python/scgi/fcgi or support django, TG) and ask them would they want to cooperate. We (Pylons Project) c

Re: UTF-8 ... help

2007-01-11 Thread Damjan
use Python unicode strings! Please read: http://pylonshq.com/docs/0.9.4/internationalization.html --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email to pylons

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

Custom publisher and controller

2007-01-28 Thread Damjan
I've been playing with my own WSGI based publisher (based on selector) and a custom controller class ... but I wouldn't like to create a whole new framework, so I thought since Pylons is based on WSGI and should be easily extensible I could plug into it. My idea is to have a controller like th

Re: Custom publisher and controller

2007-01-31 Thread Damjan
> > My idea is to have a controller like this: > > > > class Test: > > I think you'll want to subclass something here. That something will > then implement the WSGI interface. I'm using a wrapper ... you can see it here http://pylonshq.com/pasties/64 ... I could do it like a subclass, but then I

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 pylons-d

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

Re: setting a cookie whether a redirect happens or not

2007-02-03 Thread Damjan
The exmaple from Sergey Lipnevich seems to me more clean than what's implemented in the ticket #136. This is what he said on Nov 3 2006: > response = redirect_to(controller = '...', action = '...', id = '...') > # set cookie > return response Is this not possible? --~--~-~--~~-

File management

2007-02-04 Thread Damjan
Has someone done a file management app / widget for Pylons? One to allow you to upload and delete files on the server? --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, s

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 i

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 strin

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 and

Re: Request: tutorial for ToscaWidgets :)

2007-02-06 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: Request: tutorial for ToscaWidgets :)

2007-02-06 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. More object oriented javascript... I've never done that ... I can try. --~--~-~--

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, b

Re: Routes question

2007-02-12 Thread Damjan
As suggested by Ben Bagert, I've put this in the Routes Trac http://routes.groovie.org/trac/routes/ticket/38 --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pylons-discuss" group. To post to this group, send email

Re: pylons, genshi and xml

2007-02-12 Thread Damjan
> I'm confused why I have to write render_response('someTemplate') but the > template must be named "someTemplate.html". I'm sorry to say that it > actually took me a while to figure that out. Why can't I pass the actual > file name to the render_response method like you would with myghty - > re

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

2007-02-17 Thread Damjan
About this document http://pylonshq.com/project/pylonshq/wiki/GenshiWithPylons I find it counter-intuitive for seeting that in middleware.py isn't environment.py the proper place? So this is how my environment.py looks now: def load_environment(global_conf={}, app_conf={}): mimetypes.add_ty

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 recei

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

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 httpexcept

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

2007-02-18 Thread Damjan
Since ticket 201 will be probably resolved for 0.9.5 and for those that find reading patches hard... this is what will be possible with 0.9.5 ... This is a sollution for the cookie based "show message after redirect": def __before__(self): c.message = request.cookies.get('xxx_message

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

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: Session store

2007-04-24 Thread Damjan
You can store sessions (or the needed info) in just cookies, a database (MySQL, Postgresql, etc) or memcached. It's not neccesseary to store the session in files. --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "pyl

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 logi

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