2008-3-26
| 22:55 | KarlsBerg_ | RaceKondition, im a developer, and develop a site of a trademark |
| 22:56 | FunkyBob | nife: see mod_wsgi 2.0 has gone release? |
| 22:56 | nife | Yup |
| 22:56 | nife | actually testing it is on my todo list |
| 22:57 | nife | have you used it at all ? |
| 22:58 | kinections | is it possible to connect to a postgres db without a password in django? |
| 22:58 | Magus- | that would depend entirely on your postgres setup |
| 22:58 | pfote_ | could it be that the Paginator Docs (http://www.djangoproject.com/documentation/pagi...) are outdated or for a different version? this doesnt match the sources at all ?? |
| 22:59 | kinections | Magus-: it complains about no password if i leave it empty |
| 22:59 | kinections | Magus-: i can connect without a password using psql from cli |
| 22:59 | KarlsBerg_ | nife, a ResizeHandler that use a queue and return this one to one ? is sufficient (singleton) |
| 22:59 | Magus- | kinections: tried putting nonsense there and see if it auths anyway? |
| 22:59 | kinections | or... i think so, let me go play around something |
| 23:00 | pfote_ | oh i see , since release 7306, and i have 7154, never mind |
| 23:01 | Klowner | argh this is confusing me. I have Country, State, and City models. To get a list of cities within a country, City.objects.filter(state__country='US') works fine, except I have a custom CityManager which overrides filter() and it works unless I'm trying to chain a second filter() |
| 23:02 | kinections | Magus-: seems like it's postgres's problem |
| 23:03 | brodie | |
| 23:04 | Klowner | City.objects.filter(my_strange_custom_criteria=foo) works, but City.objects.filter().filter(my_strange_custum_critera=foo) doesn't call my custom filter |
| 23:04 | tesseracter | Does anyone here have the slightest idea how to retrieve the cleaned values from a MultiValueField? We're trying to pass them back.. and getting zilch. |
| 23:04 | brodie | funny, the trac diff viewer doesn't show additions of empty files |
| 23:06 | pfote_ | tesseracter: did you try getlist()? |
| 23:08 | Cide | brodie: thanks :) |
| 23:10 | tesseracter | we've narrowed it down to incorrect POST data. How do we pass data so that it's read in by ModelForm and passed to a MultiValueField? Our compress method is getting an empty list. |
| 23:11 | Magus- | ? |
| 23:11 | Magus- | are you building post data manually from something? |
| 23:11 | visik7 | I'm still searching this MultiValueField but I can't find it in the doc |
| 23:12 | tesseracter | Hang on 30 seconds.. you may have solved my problem |
| 23:13 | visik7 | oh newforms |
| 23:13 | coulix | an other proof of concept advice: i will have a global counter of the numbers of games played so far (x), for specific need i want that each user see the x being updated on client side every 3s via an ajax call to the server. Cleary i can not tel my view function to do a query every 3 secs from all users. should i just use caching and compare the cache counter timestamp and the user request time stamp ? some better way ? |
| 23:14 | Magus- | huh? |
| 23:14 | visik7 | afaik db query are already cached a select doesn't hit the db, am I right = |
| 23:14 | visik7 | ? |
| 23:15 | Magus- | visik7: not enough info to answer that |
| 23:15 | Magus- | cached between requests? heck no |
| 23:15 | Magus- | cached after you get it once? generally, unless you filter again |
| 23:15 | Magus- | (in same view/etc) |
| 23:15 | visik7 | in the same view by 2 users ? |
| 23:16 | Magus- | well of course not then |
| 23:16 | Magus- | that'd be two requests |
| 23:16 | visik7 | ya |
| 23:16 | Magus- | hence 'between requests? heck no' |
| 23:17 | tesseracter | okay fixed that problem |
| 23:17 | visik7 | gg 'nite |
| 23:17 | coulix | was these for me or visik7 ? |
| 23:18 | tesseracter | now its telling me too many values to unpack somewhere inside the individual field cleaning :X |
| 23:18 | visik7 | coulix: yes but don't trust me |
| 23:19 | coulix | ok so i do a per user caching of the view function for n seconds |
| 23:19 | Magus- | coulix: what does your view have to do with the 3 second refreshing? |
| 23:20 | Xalda | Hi |
| 23:20 | coulix | i want mu |
| 23:24 | the_loch_ness_mo | Hi, guys. I have an easy one-- what is the linux command to add a project to the pythonpath? I had it noted at one point but I seem to have lost it. |
| 23:25 | Magus- | there is none |
| 23:25 | maze | export PYTHONPATH="$PYTHONPATH:/new/path" |
| 23:25 | Magus- | there's an env var you can add it to, but that's the command ot set an env var ;) |
| 23:25 | chrisdrackett | anyone here know how to keep an png's transparency when using PIL's thumbnail? |
| 23:27 | the_loch_ness_mo | waha! thank you., maze. Magus, so you're saying i'm setting an environment variable, not adding a folder to the pythonpath. Hmm. |
| 23:28 | rozwell | the_loch_ness_mo: pythonpath is itself an environment variable |
| 23:28 | coulix | i dont want to have all incoming requests from users forcing my view to do a query every 3s to check the counter value (too much stress?), so i was thinking of caching the value once somewhere for 4s. and all incoming request with time < cached global counter + 4s from all users will not do any db query but return the cached value. i think thats what view caching does anyway. |
| 23:28 | tesseracter | im making a state ChoiceField, but no choices are passed thru to the form. ideas? |
| 23:28 | the_loch_ness_mo | as i understand it, the environment variable is $PYTHONPATH and I'm adding my project to it. |
| 23:29 | Xalda | Hi, i have some problems trying to log in and out some users in a django project. To make sure request.user is loggedin in a template is user.is_authenticated the only way ? is it better to use login required decorator ? |
| 23:29 | greigr | question about dumpdata; other than writing a custom dumpdata, is there any way to exclude certain models from a dump ? i.e. is there a dynamic way to affect get_models()? |
| 23:29 | the_loch_ness_mo | thanks to maze, thanks magus and rockwell |
| 23:32 | Xalda | :( |
| 23:32 | Magus- | Xalda: if you wish to require someone to login before accessing a view, of course the decorator is better |
| 23:32 | Magus- | that prevents them from hitting it entirely |
| 23:32 | Magus- | doing that in the template would be bad |
| 23:34 | Xalda | i have a index template with a div for user's menu, when the index view takes a loged user this div shows a menu, else shows a login form. |
| 23:35 | Magus- | if its only part of the template you want to change, then of course doing it in the template is right :) |
| 23:35 | Magus- | since your goal isn't to block the entire view, the decorator would not work |
| 23:35 | wolfe smells a PHPer XD | |
| 23:36 | Xalda | oh, ok |
| 23:36 | Xalda | but i found problems using this solution |
| 23:36 | kawsper | Which editor does people use for python and django? And is there anything out there which supports autocompletion for djangos ORM and classes? |
| 23:37 | mattmcc | Everybody uses the editor they like. |
| 23:37 | Xalda | some times, i log me out, i watch other web secction and i appear logged in . How can be this possible ? |
| 23:37 | Alex_Gaynor | I use gedit, I think WindIDE has django support though |
| 23:38 | Xalda | i also use gedit |
| 23:38 | Xalda | ***wolfe, i don't like PHP , i'm simple newbie |
| 23:38 | robvdl | I use Geany |
| 23:39 | Xalda | jajaja, which editor do you do for python an django ? sounds like a topic flame xD |
| 23:39 | wolfe | Alex_Gaynor: don't you mean WingIDE? |
| 23:39 | Alex_Gaynor | wolfe: Yeah :/ |
| 23:41 | robvdl | I like the project manager in the latest version of Geany |
| 23:41 | Magus- | Xalda: what do you mean you "watch other web section" ? |
| 23:42 | Xalda | for example, index template, i log in, all right |
| 23:42 | Xalda | event_detail template, i look like logged out |
| 23:42 | Xalda | and the most strange |
| 23:43 | Xalda | i can login in index template with an user, and login in event_detail template with other user |
| 23:44 | mattmcc | Are you not remembering to use RequestContext whenever you need to access a variable set by a context processor? |
| 23:44 | Xalda | i am very newbie and this problem made me headache some weeks ago xD (alfo i am so bad speaking in english) |
| 23:44 | kawsper | Xalda: Didnt mean to make a flame war, i just wanted code-completion, and i remember that my friend did it, but due to the time in Europe i cant call him :) |
| 23:44 | Xalda | i going to check that mattmcc thanks |
| 23:45 | Xalda | kawsper :) |
| 23:46 | davidcramer | ok adventures in postgresql |
| 23:46 | davidcramer | <class 'psycopg2.ProgrammingError'>: current transaction is aborted, commands ignored until end of transaction block |
| 23:46 | davidcramer | not that this isnt an AWESOME error |
| 23:46 | wolfe | wow, nice |
| 23:46 | thebitguru | I am looking for a new hsot that support postgresql, any suggestions? I am looking for a payment of around 10/month |
| 23:46 | davidcramer | but *WHY* was the transaction aborted -.- |