| [00:00:07] |
<mitsuhiko> |
the table is just useless |
| [00:00:28] |
<mitsuhiko> |
Kaelten: but only a cProfile stats object, hotshot or regular profile are useless too ;) |
| [00:00:35] |
<davidcramer> |
ya its good for an overview, and to kind of get an idea where stuff happens |
| [00:00:47] |
<davidcramer> |
you should see my crazy code for the debug toolbar |
| [00:00:55] |
<davidcramer> |
i had to dig into the profile/pstats modules to figure out how to read stuff just to output it better |
| [00:00:57] |
<Kaelten> |
david: how would I fix your code to pickle the object |
| [00:01:02] |
<davidcramer> |
hrm one sec |
| [00:01:19] |
<mitsuhiko> |
davidcramer: no. that is totally useless because we have no idea what is causing the calls |
| [00:01:23] |
<davidcramer> |
self.profiler.print_stats(1) |
| [00:01:24] |
<davidcramer> |
right there |
| [00:01:37] |
<davidcramer> |
you want to change to to be like |
| [00:01:54] |
<davidcramer> |
out.write(pickle.dumps(self.profiler.getstats())) |
| [00:01:54] |
<mitsuhiko> |
Kaelten: file("foo", "wb").write(pickle.dumps(profiler.getstats(), 2)) |
| [00:01:59] |
<davidcramer> |
or get_stats, whatever it is |
| [00:02:07] |
<davidcramer> |
or that one :P |
| [00:03:07] |
<davidcramer> |
going to try indian food in nebraska tonight.. lets see if I come back alive |
| [00:04:43] |
<Kaelten> |
mitsuhiko: PicklingError: Can't pickle <type 'code'>: it's not found as __builtin__.code |
| [00:05:58] |
<mitsuhiko> |
Kaelten: hold on a second |
| [00:05:58] |
<davidcramer> |
monkey patch imo |
| [00:06:41] |
<mitsuhiko> |
Kaelten: right. that's not dumpable. my fault |
| [00:06:53] |
<mitsuhiko> |
Kaelten: maybe you could install dozer and execute this: |
| [00:07:09] |
<mitsuhiko> |
from dozer.profile import buildtree, write_dot_graph |
| [00:07:28] |
<mitsuhiko> |
write_dot_graph(stats, buildtree(stats), "output.gv") |
| [00:07:31] |
<mitsuhiko> |
adn paste the gv file |
| [00:07:42] |
<ronny> |
dozer? |
| [00:07:46] |
<ronny> |
ah that thing |
| [00:07:46] |
<Kaelten> |
hrm, easy_install dozer? |
| [00:07:50] |
<mitsuhiko> |
dozer's here: http://www.bitbucket.org/bbangert/dozer/overview/ |
| [00:09:14] |
<Kaelten> |
requires pylons and paste? |
| [00:09:15] |
<Kaelten> |
heh |
| [00:09:21] |
<Kaelten> |
ok so installed |
| [00:10:37] |
<Kaelten> |
mitsuhiko: is stats the getstats() return? |
| [00:11:15] |
<Kaelten> |
ImportError: No module named mako.lookup |
| [00:11:17] |
<Kaelten> |
le sigh |
| [00:11:47] |
<mitsuhiko> |
Kaelten: yes |
| [00:11:56] |
<mitsuhiko> |
Kaelten: comment out the import and disable the loader creation |
| [00:11:57] |
<steg> |
i like indian food :) |
| [00:12:06] |
<steg> |
or at least the british version of indian food probably never had real indian food |
| [00:12:07] |
<mitsuhiko> |
the profiler doesn't need it unless you run it :) |
| [00:12:38] |
<Kaelten> |
AttributeError: 'tuple' object has no attribute 'code' |
| [00:12:55] |
<Kaelten> |
write_dot_graph(self.profiler.stats, buildtree(self.profiler.stats), "/tmp/output.gv") |
| [00:13:01] |
<Kaelten> |
oh bah |
| [00:13:02] |
<Kaelten> |
my bad |
| [00:13:24] |
<davidcramer> |
steg: there was good indian food in san francisco, but the midwest isn't known for its ethnic food (unless its mexican) |
| [00:13:57] |
<steg> |
davidcramer: ahh. Over here most restaurants are serving non-british food |
| [00:14:08] |
<davidcramer> |
ya no one likes british food |
| [00:14:09] |
<davidcramer> |
:) |
| [00:14:12] |
<steg> |
Indian is *really* popular ;) |
| [00:14:20] |
<Kaelten> |
mitsuhiko: http://paste.pocoo.org/show/85465/ |
| [00:14:24] |
<steg> |
davidcramer: hey, there's some good british food ;) |
| [00:14:55] |
* |
CIA-49 has quit IRC |
| [00:15:50] |
<mitsuhiko> |
woa. huge graph |
| [00:16:31] |
<davidcramer> |
haha |
| [00:16:52] |
<steg> |
we don't have too many american restaruants that aren't fast-food |
| [00:17:09] |
* |
aconbere has quit IRC |
| [00:17:12] |
<steg> |
or things similar to TGI fridays i don't know if that's considered fast food or not |
| [00:17:44] |
<mitsuhiko> |
Kaelten: how many templates are that? |
| [00:17:48] |
<mitsuhiko> |
(for that specific first request) |
| [00:17:52] |
<Kaelten> |
well its one page |
| [00:18:00] |
<mitsuhiko> |
how many layout templates or includes? |
| [00:18:10] |
<Kaelten> |
maybe 5 files or so? |
| [00:18:12] |
<Kaelten> |
6? |
| [00:18:20] |
<Kaelten> |
since it'd be including the macro files etc |
| [00:18:46] |
<mitsuhiko> |
yep |
| [00:18:59] |
<steg> |
i had breakfast at denny's once in the US |
| [00:19:02] |
<Kaelten> |
so is that whats going on? |
| [00:19:11] |
* |
Kaelten has quit IRC |
| [00:19:18] |
<steg> |
i poured what i thought was syrup on a pancake |
| [00:19:25] |
<steg> |
but it turned out to be butter |
| [00:19:38] |
<prencher> |
thats some nasty fucking butter |
| [00:19:44] |
<steg> |
and i remember we could order one meal between three :P |
| [00:19:46] |
* |
Kaelten has joined #pocoo |
| [00:20:10] |
<mitsuhiko> |
Kaelten: whatever you do, it's a rather complex template for the compiler :) |
| [00:20:11] |
<steg> |
prencher: it was melted butter, i thought it was really thin syrup, like maple syrup |
| [00:20:20] |
<mitsuhiko> |
or many of them. so that takes unacceptable long |
| [00:20:59] |
<mitsuhiko> |
as a quickfix you could wrap the loader and dump/load the templates to/from memcache |
| [00:21:05] |
<mitsuhiko> |
by that i mean the code of the template |
| [00:21:20] |
<mitsuhiko> |
which i fear requires some hackery |
| [00:21:29] |
<mitsuhiko> |
easier workaround: get some of the templates to compile on application startup |
| [00:21:32] |
<mitsuhiko> |
(the layout templates) |
| [00:21:43] |
<Kaelten> |
damn wireless |
| [00:21:45] |
<Kaelten> |
hehe |
| [00:21:47] |
<Kaelten> |
glad to push your limits :) |
| [00:21:49] |
<Kaelten> |
well one thought I had is that paying this time isn't bad, if it only happened once. |
| [00:21:51] |
<Kaelten> |
but since I'm running prefork i'm paying it randomly hundreds of times |
| [00:21:59] |
<Kaelten> |
:s |
| [00:22:39] |
<mitsuhiko> |
well. it's definetively something i haven't thought enough about it |
| [00:22:50] |
<mitsuhiko> |
if many templates are compiled the first request, it becomes darn noticeable |
| [00:23:20] |
<Kaelten> |
ya, varily |
| [00:23:26] |
<Kaelten> |
I've got to run, have to see a lawyer |
| [00:23:32] |
<Kaelten> |
bbiab |
| [00:23:39] |
<mitsuhiko> |
cya |
| [00:23:43] |
* |
Kaelten has quit IRC |
| [00:50:39] |
* |
mhansen_ has quit IRC |
| [01:04:39] |
* |
CIA-49 has joined #pocoo |
| [01:14:25] |
* |
KAeL has quit IRC |
| [02:19:42] |
* |
jinks has quit IRC |
| [02:28:23] |
* |
aconbere has joined #pocoo |
| [03:00:51] |
* |
Baumichel has quit IRC |
| [03:32:11] |
* |
jinks has joined #pocoo |
| [04:02:11] |
* |
jinks has quit IRC |
| [04:06:00] |
* |
jinks has joined #pocoo |
| [04:14:32] |
* |
aconbere has quit IRC |
| [04:38:26] |
* |
davidcramer has quit IRC |
| [04:38:40] |
* |
davidcramer has joined #pocoo |
| [04:43:20] |
* |
CIA-49 has quit IRC |
| [06:43:08] |
* |
CIA-49 has joined #pocoo |
| [08:17:55] |
* |
KAeL has joined #pocoo |
| [08:43:25] |
* |
jpcw2002 has joined #pocoo |
| [09:01:10] |
* |
davidcramer has quit IRC |
| [09:01:50] |
* |
davidcramer has joined #pocoo |
| [09:12:45] |
* |
spykid has joined #pocoo |
| [09:13:27] |
* |
spykid has left #pocoo |
| [09:14:47] |
<ronny> |
mitsuhiko: http://techspot.zzzeek.org/?p=31 <- would thhis be something for the new dozer debugger stuff? |
| [09:24:35] |
* |
CIA-49 has quit IRC |
| [09:49:30] |
* |
davidcramer has quit IRC |
| [10:08:20] |
* |
CIA-50 has joined #pocoo |
| [10:39:01] |
* |
leche has joined #pocoo |
| [10:45:22] |
* |
jpcw2002 has quit IRC |
| [10:58:15] |
* |
CIA-50 has quit IRC |
| [11:21:00] |
* |
davidcramer has joined #pocoo |
| [11:21:16] |
<davidcramer> |
any good ad networks like google out there? |
| [11:26:05] |
<mitsuhiko> |
NEeeieieiiiiinnnn!!! |
| [11:26:51] |
<mitsuhiko> |
someone just enrolled to study the same thing i do who notoriously is someone that becomes annoying pretty quick |
| [11:27:03] |
<mitsuhiko> |
actually, no. the name was just wrong :D |
| [11:29:09] |
* |
harnak has joined #pocoo |
| [11:30:15] |
* |
delroth has quit IRC |
| [11:30:34] |
* |
delroth has joined #pocoo |
| [11:31:05] |
* |
_P_ has joined #pocoo |
| [11:33:45] |
<aa_> |
mitsuhiko: in my sleep I thought of an amazing name for TextPress |
| [11:33:53] |
<aa_> |
mitsuhiko: you might well hate the name of course :) |
| [11:33:59] |
<aa_> |
"drupyl" |
| [11:34:10] |
* |
aa_ runs away very fast |
| [11:36:35] |
<birkenfeld> |
rofl |
| [11:37:14] |
<_P_> |
ahah |
| [11:37:45] |
<ronny> |
aa_: there already is a 1:1 port of drupal to python |
| [11:37:48] |
<_P_> |
drupi is an '80 "son of flowers" singer :D |
| [11:37:50] |
<ronny> |
its hideous and stupid |
| [11:37:58] |
<_P_> |
*italian |
| [11:38:14] |
<mitsuhiko> |
aa_: http://drupy.net/ |
| [11:38:42] |
<aa_> |
no, it's an actual code port? |
| [11:39:07] |
<_P_> |
finally gnomefiles is back |
| [11:39:42] |
<aa_> |
no way, almighty, they cloned the drupal code |
| [11:39:53] |
<aa_> |
ok, they deserve the name more than you do mitsuhiko |
| [11:40:40] |
<aa_> |
oh my goodness me that is a specially bad idea |
| [11:40:55] |
<aa_> |
anyone have anything good to say about this project? |
| [11:41:39] |
<ronny> |
aa_: i already took a look at that |
| [11:41:55] |
<ronny> |
they wanat to keep the dripal development experience for plugin developers |
| [11:42:03] |
<ronny> |
so every painfull detail will stay |
| [11:42:10] |
<ronny> |
very retarded |
| [11:42:35] |
<aa_> |
ronny: does it not surprise you that there are no good python cms? |
| [11:42:40] |
<damjan> |
it looks like a good strategy to me |
| [11:43:03] |
<aa_> |
damjan: well, it is a safe strategy I guess |
| [11:44:07] |
<ronny> |
damjan: writing php in python isnt smart at all |
| [11:44:31] |
<ronny> |
they ported bascially all hideous php things |
| [11:44:58] |
<damjan> |
ronny: I guess, if they asked you before writing Drupal in PHP you would have said the same about PHP |
| [11:45:07] |
<damjan> |
.. but.. they did it |
| [11:45:20] |
<damjan> |
and Drupal today is the most powerfull CMS there is |
| [11:45:22] |
<damjan> |
so... |
| [11:45:42] |
<ronny> |
damjan: well, i dont care what they do |
| [11:45:53] |
<ronny> |
damjan: but writing php in python is really stupid |
| [11:46:24] |
<ronny> |
cause python is for writing python in python |
| [11:47:26] |
<ronny> |
writing web-apps in php is something *i* would not do, if others want to do that its really not *my* problem |
| [11:47:26] |
<aa_> |
well, not sure drupal is more "powerful" than zope |
| [11:47:47] |
<ronny> |
but if they do 1:1 ports of hideous php constructs to python it pisses me off |
| [11:49:19] |
<damjan> |
aa_: well zope is not a CMS as such |
| [11:49:31] |
<damjan> |
and zope seems to be a dead end |
| [11:54:38] |
<damjan> |
basically you can start drupy on a Drupal Database and it should work... that would be cool |
| [11:56:41] |
<ronny> |
well, its not threadsave, slow, more bug-ridden than the php thing |
| [11:57:02] |
<ronny> |
i would prefer a php drupal over drupy every time i have that choice |
| [12:06:03] |
<aa_> |
damjan: yes, "not being a cms" is what makes it more powerful |
| [12:06:50] |
<damjan> |
maybe I should've said empowering |
| [12:07:12] |
<damjan> |
I've seen people build excelent sites with Drupal in very short time |
| [12:07:15] |
* |
CIA-51 has joined #pocoo |
| [12:07:36] |
<damjan> |
people that couldn't cope with Zope (and couldn't install it on any hosting probably) |
| [12:09:59] |
* |
davidcramer has quit IRC |
| [12:22:31] |
<aa_> |
damjan: well, yes, you are right about that |
| [12:29:48] |
* |
grumpy has joined #pocoo |
| [12:32:59] |
<grumpy> |
mitsuhiko: guy at work using Jinja found that although have case insensitive sort for dict sort in for loop, no case insensitive sort for set/list unless you do it before populating dictionary for template variable set. Is that right? |
| [12:36:47] |
<mitsuhiko> |
grumpy: yes. there is only a dictsort filter |
| [12:36:55] |
<mitsuhiko> |
that's ridiculous, should be changed |
| [12:38:16] |
<grumpy> |
mitsuhiko: as to Django template engine threading issues, are you talking about problems around http://code.djangoproject.com/ticket/7501 |
| [12:38:42] |
<mitsuhiko> |
grumpy: that's just one of multiple |
| [12:39:13] |
<grumpy> |
after my post was told that this is an issue if reusing the template instance over and over, but also told that for normal use case each request handler would have its own template instance so not an issue |
| [12:39:39] |
<grumpy> |
what are the others then and do they in practice pose a problem in context they are used in real world Django application |
| [12:39:57] |
<mitsuhiko> |
grumpy: just check the template tags django ships |
| [12:40:07] |
<mitsuhiko> |
all the tags that assign something to an attribute of self in render() have problems |
| [12:40:11] |
<grumpy> |
you mean I have to read code :-( |
| [12:41:17] |
<mitsuhiko> |
grumpy: http://www.bitbucket.org/mitsuhiko/jinja2-main/src/tip/ext/django2jinja/ |
| [12:41:26] |
<mitsuhiko> |
hit f5 and f5 |
| [12:41:39] |
<mitsuhiko> |
you will see the row colors do funny things |
| [12:41:56] |
<grumpy> |
hmmm, what is a windows box, presume you mean to force a reload :-) |
| [12:42:12] |
<mitsuhiko> |
yep. reload :) |
| [12:44:51] |
<grumpy> |
I'll have to look at it another time, want to get some coding of my own down in couple of free hours I have tonight. |
| [12:45:46] |
<mitsuhiko> |
grumpy: http://code.djangoproject.com/browser/django/trunk/django/template/defaulttags.py#L40 |
| [12:46:03] |
<mitsuhiko> |
cycle is an easy example. the status of the cycling is stored on the node which is shared |
| [12:46:21] |
<mitsuhiko> |
same problem with ifchanged: http://code.djangoproject.com/browser/django/trunk/django/template/defaulttags.py#L159 |
| [12:46:36] |
<grumpy> |
brain overload :-( |
| [12:46:56] |
<mitsuhiko> |
or block: http://code.djangoproject.com/browser/django/trunk/django/template/loader_tags.py#L12 |
| [12:47:06] |
<mitsuhiko> |
or extends: http://code.djangoproject.com/browser/django/trunk/django/template/loader_tags.py#L39 |
| [12:47:17] |
<grumpy> |
brain exploded |
| [12:47:21] |
<hads> |
heh |
| [12:59:10] |
<leche> |
hey grumpy |
| [12:59:36] |
<grumpy> |
leche: you called? |
| [13:00:09] |
<leche> |
grumpy: just saying hello :-) |
| [13:00:45] |
<grumpy> |
Now if I only knew who you were, not that I know who half the people here are anyway. :-) |
| [13:01:18] |
<leche> |
grumpy: i was the one with that kolab issue |
| [13:01:43] |
<leche> |
well, i still have some issues, but they arent mod_wsgi related |
| [13:02:09] |
<grumpy> |
Yeah I remember. Apache installation which didn't appear to have one of the prerequisites for running daemon mode. |
| [13:02:21] |
<grumpy> |
I may be starting to go senile, but do remember some things. |
| [13:02:49] |
<leche> |
yeah, right, im running embedded mode and it seems to work fine |
| [13:27:32] |
* |
leche has quit IRC |
| [13:28:29] |
* |
leche has joined #pocoo |
| [13:55:38] |
* |
grumpy has quit IRC |
| [14:02:39] |
* |
Baumichel has joined #pocoo |
| [14:34:46] |
<Leonidas> |
mitsuhiko: you see row colors here: http://www.bitbucket.org/mitsuhiko/jinja2-main/src/tip/ext/django2jinja/ ? Because I'm not. |
| [14:35:01] |
<mitsuhiko> |
Leonidas: i do |
| [14:35:07] |
<mitsuhiko> |
broken color profile? |
| [14:35:52] |
<Leonidas> |
maybe that's a premium feature. |
| [14:36:40] |
* |
jinks has quit IRC |
| [14:37:07] |
* |
jinks has joined #pocoo |
| [14:38:34] |
<birkenfeld> |
what's wrong here: http://pocoo.org/~gbrandl/cn.png |
| [14:39:46] |
<Leonidas> |
mitsuhiko: http://img258.imageshack.us/my.php?image=rowsks7.png |
| [14:40:10] |
<aa_> |
birkenfeld: you can't read "TEXT SIZE" ? |
| [14:40:40] |
<birkenfeld> |
hah, so I'm not the only one... |
| [14:40:41] |
<mitsuhiko> |
Leonidas: i can see the row colors here |
| [14:40:45] |
<mitsuhiko> |
(in your screenshot) |
| [14:40:53] |
<mitsuhiko> |
gray, gray, white |
| [14:41:32] |
<mitsuhiko> |
birkenfeld: no idea. what is it? |
| [14:41:56] |
<birkenfeld> |
mitsuhiko: those who need larger text size won't be able to read "TEXT SIZE" |
| [14:42:18] |
<Leonidas> |
mitsuhiko: I can't, what display do you have? |
| [14:42:37] |
<mitsuhiko> |
birkenfeld: oh. haven't even seen that button :) |
| [14:43:08] |
<Leonidas> |
birkenfeld: and I thought the real WTF(tm) was, that you saved it as cn.png instead of cnn.png ;) |
| [14:43:19] |
<mitsuhiko> |
Leonidas: color lcd with a custom color profile that matches a crt best |
| [14:43:36] |
<mitsuhiko> |
all the apple shipped color profiles are way to blue |
| [14:44:08] |
<birkenfeld> |
mitsuhiko: that reminds me... there's a too/to mistake in the last paragraph of your blog post too |
| [14:44:13] |
<Leonidas> |
maybe thats why. jespern should consider changing the color so people who have no tuned color profiles can see that too |
| [14:44:26] |
<apollo13> |
can't see it either |
| [14:44:42] |
<mitsuhiko> |
birkenfeld: fixed. thanks |
| [14:45:00] |
<apollo13> |
at least if you were refering to the templates/djangijinja... list |
| [14:45:03] |
<mitsuhiko> |
Leonidas: i can see it on my linux box without color profiles configured too |
| [14:45:31] |
<birkenfeld> |
FWIW, I don't see a color difference too |
| [14:45:33] |
<Leonidas> |
mitsuhiko: maybe you have a less crappy display than I. |
| [14:45:46] |
<Leonidas> |
birkenfeld: you probably have the same panel as I have, samsung. |
| [14:45:49] |
<birkenfeld> |
only when squinting at the screen from keyboard height |
| [14:45:58] |
<birkenfeld> |
maybe |
| [14:48:38] |
* |
aa_ sees a slight difference |
| [14:48:46] |
<Leonidas> |
birkenfeld: I can see a color difference too, when I look from the top, in an angle that I get reverse video. |
| [14:48:59] |
<aa_> |
(using the gimp color dropper thing) |
| [15:03:00] |
* |
Kaelten has joined #pocoo |
| [15:10:16] |
* |
harnak has quit IRC |
| [15:20:46] |
<mitsuhiko> |
birkenfeld: is there a way to trick marshal to load from a file-like object? |
| [15:24:01] |
<Kaelten> |
hey guys |
| [15:24:57] |
<Kaelten> |
mitsuhiko: I sorted by cumtime and its spending all but like 1ms in the render function, lol |
| [15:25:33] |
<mitsuhiko> |
Kaelten: better look at a graph, cumtime is hard to understand |
| [15:25:45] |
<mitsuhiko> |
but that's a problem with django's lazy queries |
| [15:25:52] |
<mitsuhiko> |
they are usually fired in the template :-/ |
| [15:26:13] |
<Kaelten> |
heh, fair enough |
| [15:26:35] |
<Kaelten> |
if I call get_template it compiles it then right? |
| [15:27:39] |
<Kaelten> |
hrm doesn't seem too. |
| [15:28:01] |
<empty> |
mitsuhiko: great post on jinja |
| [15:28:45] |
<mitsuhiko> |
Kaelten: working on your bytecode cache now :) |
| [15:29:02] |
<mitsuhiko> |
Kaelten: get_template only compiles it if it's not yet in memory |
| [15:29:04] |
<mitsuhiko> |
empty: thanks |
| [15:29:09] |
<Kaelten> |
oh? whatcha got planned? |
| [15:29:13] |
<Kaelten> |
empty: link? |
| [15:29:14] |
* |
asmodai has quit IRC |
| [15:29:57] |
<dennda> |
did somebody recently clean up zines bug tracker or is my mind fooling me? |
| [15:30:34] |
<empty> |
http://lucumr.pocoo.org/cogitations/2008/09/16/why-jinja-is-not-django-and-why-django-should-have-a-look-at-it/ |
| [15:30:38] |
* |
stifal has joined #pocoo |
| [15:33:14] |
<Kaelten> |
mitsuhiko: on a side note, it'd be nice if you could nest comment tags instead of having the first #} break out of it, but thats really a minor thing (your lexer comments made me think of it) |
| [15:34:05] |
<mitsuhiko> |
i'll think about it. makes sense i guess |
| [15:34:52] |
<Kaelten> |
its something I do by accident a lot, overhaul template, comment out the old, forget I had a comment in there somewhere, search for #} to stop the page from blowing up |
| [15:45:09] |
<Kaelten> |
mitsuhiko: nice entry |
| [16:24:32] |
* |
rawb has joined #pocoo |
| [16:34:33] |
* |
maix has joined #pocoo |
| [16:44:55] |
<damjan> |
http://werkzeug.pocoo.org/documentation/utils#wsgi-helpers "If there is just one close function it can be bassed instead of the list." |
| [16:45:05] |
<damjan> |
*bassed* ?!? |
| [16:45:41] |
<birkenfeld> |
should be passed I guess |
| [16:46:33] |
* |
unlink has joined #pocoo |
| [16:47:47] |
<damjan> |
I wonder why list in any way... |
| [16:47:58] |
<damjan> |
isn't arg1=None, arg2=None) good enough |
| [16:48:07] |
<damjan> |
so you pass one or two functions |
| [16:49:35] |
<Leonidas> |
damjan: because numbered arguments suck, for example? |
| [16:50:01] |
<damjan> |
? |
| [16:59:12] |
<dennda> |
Is there any apache setting that can prevent redirects? |
| [17:00:29] |
<TheSheep> |
dennda: what kind of redirects? |
| [17:00:46] |
<TheSheep> |
dennda: 303? |
| [17:00:53] |
<dennda> |
TheSheep: lemme check |
| [17:01:18] |
* |
EnTeQuAk has joined #pocoo |
| [17:01:26] |
<dennda> |
http://paste.pocoo.org/show/85513/ <-- this doesn't work. now let me find out what the actual http code is |
| [17:02:15] |
* |
maix_ has joined #pocoo |
| [17:02:22] |
<dennda> |
TheSheep: 302 afaict |
| [17:02:25] |
<TheSheep> |
dennda: ah, so you don't want t o*prevent* redirects |
| [17:02:31] |
* |
maix has quit IRC |
| [17:02:32] |
<dennda> |
TheSheep: jah |
| [17:02:33] |
* |
maix_ is now known as maix |
| [17:02:53] |
<dennda> |
TheSheep: talking of leches zine setup. it does work for me, but doesn't work for him. so I guess it's a config issue |
| [17:03:18] |
<TheSheep> |
browser could ignore redirects too |
| [17:04:40] |
<dennda> |
TheSheep: browser isn't the issue |
| [17:04:52] |
<dennda> |
TheSheep: it works with my zine instance, but not his in the very same browser |
| [17:07:56] |
<TheSheep> |
dennda: can you check what response headers you get? |
| [17:08:03] |
<dennda> |
TheSheep: how? |
| [17:08:26] |
<TheSheep> |
dennda: wget -S |
| [17:08:51] |
<TheSheep> |
dennda: or there are some extensions for firefox that can show you, for example webdeveloper toolbar |
| [17:10:12] |
<dennda> |
ah yes I got that toolbar |
| [17:10:22] |
<dennda> |
better idea anyway since you must be logged in to zine |
| [17:12:13] |
<TheSheep> |
in the info menu, at the bottom there is view response headers |
| [17:13:20] |
<dennda> |
TheSheep: huh? that's a static page |
| [17:13:45] |
<dennda> |
so I click the link and then open that view response headers tab? |
| [17:14:13] |
<TheSheep> |
yes |
| [17:16:09] |
<dennda> |
TheSheep: 200 OK |
| [17:16:09] |
<dennda> |
^^ |
| [17:26:28] |
<david`bgk> |
mitsuhiko, is it recommended to use the trunk of jinja? |
| [17:28:19] |
<apollo13> |
david`bgk: jinja 1 and 2 are stable, so most of the commits will be bugfixes |
| [17:28:33] |
<apollo13> |
and use trunk :) |
| [17:28:45] |
<david`bgk> |
ok :) |
| [17:51:36] |
<Leonidas> |
apollo13: isn't this called -main? |
| [17:51:56] |
<apollo13> |
Leonidas: not head? |
| [17:52:06] |
* |
Leonidas wishes for an official name for the main branch |
| [17:52:11] |
<birkenfeld> |
tip |
| [17:52:14] |
<Leonidas> |
apollo13: HEAD <-> tip |
| [17:52:19] |
<apollo13> |
k |
| [17:52:25] |
<apollo13> |
to much confusion |
| [17:52:42] |
<apollo13> |
normalize our language |
| [17:52:42] |
<Leonidas> |
actually, thats the same thing as in svn. |
| [17:52:47] |
<apollo13> |
yeah |
| [17:53:42] |
<Leonidas> |
svn has trunk (hg has no real, commonly agreed name for this) and HEAD (hg uses tip, whereas git uses HEAD, whereas bzr uses basically nothing) |
| [17:54:02] |
<apollo13> |
lol |
| [17:54:42] |
<ronny> |
actually its a bit different |
| [17:54:53] |
<Leonidas> |
usually it is called -1, but bzr folks know what tip or HEAD mean. |
| [17:55:09] |
<birkenfeld> |
actually, the notion of "trunk" makes no sense in DVCS |
| [17:55:20] |
<ronny> |
bzr branches cant have multiple heads |
| [17:55:35] |
<ronny> |
so a tip marker has no sense |
| [17:55:39] |
<Kaelten> |
mitsuhiko: ping when you get back I seem to have found some sort of compilation error in tip Jinja2 |
| [17:55:56] |
<apollo13> |
Kaelten: show the error |
| [17:56:12] |
<Kaelten> |
expected an indented block (details.html, line 18) |
| [17:56:13] |
<Leonidas> |
birkenfeld: well, technically no, thats why there is no such term. But often there is one official repository, like jinja2-main or mozilla-central etc. |
| [17:56:19] |
<Kaelten> |
but its erroring when it runs the compile statement |
| [17:56:32] |
<apollo13> |
uh |
| [17:56:46] |
<birkenfeld> |
Leonidas: yes. -main is not bad for that |
| [17:57:05] |
<birkenfeld> |
or -official for often-forked repo |
| [17:57:06] |
<birkenfeld> |
s |
| [17:57:12] |
<Kaelten> |
apollo13: http://paste.pocoo.org/show/85520/ |
| [17:57:19] |
<Leonidas> |
otoh, hg has "hg" and "crew" :) |
| [17:57:30] |
<Leonidas> |
and each one again as -stable. |
| [17:58:22] |
<Kaelten> |
not sure exactly what I'm doing in that template thats causing it to blow up on compilation |
| [17:58:25] |
<Kaelten> |
but its got to be fun |
| [18:01:16] |
* |
ckknight has joined #pocoo |
| [18:05:14] |
* |
_P_ has left #pocoo |
| [18:10:14] |
* |
EnTeQuAk has quit IRC |
| [18:12:57] |
* |
EnTeQuAk has joined #pocoo |
| [18:19:27] |
<thatch> |
Kaelten: it looks like you have an empty if construct for user.avatar_image or so |
| [18:21:27] |
<Kaelten> |
thatch: {% if user.avatar_image %}? |
| [18:24:28] |
<thatch> |
Kaelten: yeah, something like that. What's between the {% if ... and {% else ? |
| [18:24:34] |
* |
highwaychile has joined #pocoo |
| [18:24:40] |
<Kaelten> |
{% if user.avatar_image %} |
| [18:24:40] |
<Kaelten> |
<img alt="Avatar of {{ user.username }}" src="{{ user.avatar_image.get_thumbnail_url(48, 48)}}"/> |
| [18:24:41] |
<Kaelten> |
{% else %} |
| [18:24:41] |
<Kaelten> |
<em class="{{ 'male' if user.gender == 'm' else 'female' }}">Avatar of {{ user }}</em> |
| [18:24:41] |
<Kaelten> |
{% endif %} |
| [18:24:50] |
* |
POX_ is now known as POX |
| [18:26:44] |
<thatch> |
Kaelten: I don't see that in the generated code... it appears to be followed by something about draw_author_dow |
| [18:27:05] |
<Kaelten> |
that check is inside draw_author_row |
| [18:27:27] |
<Kaelten> |
{% block authors_box_rows %} |
| [18:27:28] |
<Kaelten> |
{% if page.last_author != page.first_author %} |
| [18:27:28] |
<Kaelten> |
{{ draw_author_row(page.last_author, true, page.last_author.get_absolute_url(), em_text='Most recent author') }} |
| [18:27:28] |
<Kaelten> |
{% endif %} |
| [18:27:28] |
<Kaelten> |
{{ draw_author_row(page.first_author, false, page.first_author.get_absolute_url(), em_text='Original author') }} |
| [18:27:30] |
<Kaelten> |
{% endblock %} |
| [18:27:32] |
<Kaelten> |
thats where I call those |
| [18:28:13] |
<Kaelten> |
and yes my top level templates are devoid of html |
| [18:28:15] |
<thatch> |
I don't know enough to help you then. The error is on line 18 (pasting, without indentation): |
| [18:28:15] |
<Kaelten> |
its kinda nice |
| [18:28:24] |
<thatch> |
'from __future__ import division\nfrom jinja2.runtime import LoopContext, Context, TemplateReference, Macro, Markup, TemplateRuntimeError, missing, concat, escape, markup_join, unicode_join\nname = \'wowace/bone/details.html\'\n\ndef root(context, environment=environment):\n parent_template = None\n l_BONE = context.resolve(\'BONE\')\n if 0: yield None\n parent_template = environment.get_template(l_BONE, \'wowace/bone/details.html\')\n for name, pa |
| [18:28:33] |
<thatch> |
if environment.getattr(l_user, 'avatar_image'): |
| [18:28:33] |
<thatch> |
else: |
| [18:28:54] |
<thatch> |
(apologies if the giant paste came through) |
| [18:29:09] |
<Kaelten> |
if what space is expunged then its probably this line {{ draw_author_row(page.first_author, false, page.first_author.get_absolute_url(), em_text='Original author') }} |
| [18:29:23] |
<Kaelten> |
er if whitespace* |
| [18:29:35] |
<mitsuhiko> |
Kaelten: do you have a minimal testcase? |
| [18:29:48] |
<Kaelten> |
mitsuhiko: no, it doesn't happen on my other pages |
| [18:29:53] |
<Kaelten> |
although I have an idea of whats doing it |
| [18:30:02] |
<Kaelten> |
let me reupgrade my jinja |
| [18:31:57] |
<Kaelten> |
hrm nope not that line |
| [18:32:13] |
<mitsuhiko> |
Kaelten: can you paste the template source? |
| [18:32:16] |
<Kaelten> |
mitsuhiko: what can I do to help debug this? |
| [18:33:14] |
<Kaelten> |
http://paste.pocoo.org/show/85522/ |
| [18:34:26] |
<Kaelten> |
ok the bug doesn't seem to be actually in that page |
| [18:34:33] |
<Kaelten> |
but rather in the one it inherits from. |
| [18:34:51] |
<Kaelten> |
removing all but the extends statement the error still remains |
| [18:35:46] |
<mitsuhiko> |
hum |
| [18:35:53] |
<Kaelten> |
mitsuhiko: http://paste.pocoo.org/show/85523/ that segment of that template seems to be at fault |
| [18:36:29] |
<mitsuhiko> |
werid |
| [18:37:21] |
<mitsuhiko> |
i'll check that |
| [18:38:10] |
<mitsuhiko> |
yeah. there is a bug |
| [18:38:11] |
<mitsuhiko> |
somewhere |
| [18:38:41] |
<Kaelten> |
trying to find out which line(s) in particular |
| [18:39:20] |
<Kaelten> |
somehow the top macro itself is blowing up |
| [18:39:26] |
<Kaelten> |
andif I remove its content the bug shifts to line 33 |
| [18:39:50] |
<mitsuhiko> |
it seems to be a bug in buffered printing |
| [18:40:34] |
<Kaelten> |
something to do with the contents of the first and last macros |
| [18:40:57] |
<Kaelten> |
its the if statements |
| [18:41:39] |
<mitsuhiko> |
okay. got it |
| [18:41:55] |
<mitsuhiko> |
that are three bugs combined :) |
| [18:43:14] |
<Kaelten> |
lol |
| [18:43:16] |
<Kaelten> |
nice |
| [18:43:19] |
<Kaelten> |
let me know when to update and I'll be glad to test |
| [18:43:25] |
* |
POX is now known as POX1 |
| [18:44:27] |
* |
POX1 is now known as POX |
| [18:51:51] |
<mitsuhiko> |
Kaelten: okay. try latest tip |
| [18:55:11] |
<Kaelten> |
works :) |
| [18:55:14] |
<Kaelten> |
thanks much man |
| [18:56:45] |
<Kaelten> |
grabbing lunch now |
| [18:56:46] |
<Kaelten> |
thanks again man |
| [18:58:56] |
<mitsuhiko> |
ronny: no karma for you |
| [18:59:08] |
<mitsuhiko> |
someone submitted the story (with the correct headline) to proggit :) |
| [19:00:07] |
<ronny> |
mitsuhiko: so far i have gone from 1 to 13 |
| [19:00:16] |
<ronny> |
thats 13 times as much |
| [19:12:47] |
<Leonidas> |
oh man, the reddit main page is constantly broken. |
| [19:27:31] |
* |
aconbere has joined #pocoo |
| [19:39:46] |
* |
ckknight has quit IRC |
| [19:40:19] |
* |
ckknight_ has joined #pocoo |
| [19:56:02] |
* |
ckknight_ is now known as ckknight |
| [20:14:42] |
* |
CIA-51 has quit IRC |
| [20:16:40] |
* |
asmodai has joined #Pocoo |
| [20:16:54] |
<asmodai> |
well |
| [20:16:59] |
<asmodai> |
that was fun |
| [20:17:21] |
<asmodai> |
adsl modem died during the day, had a spare one which I had received a while ago |
| [20:17:31] |
<asmodai> |
but of course, you have to totally reconfigure you network |
| [20:25:54] |
<Kaelten> |
mitsuhiko: its working on production now :) |
| [20:27:43] |
<Kaelten> |
so much better 70ms vs 1200ms |
| [20:28:12] |
<ckknight> |
Kaelten: take it down another 1130 ms and we'll be on to something |
| [20:28:37] |
<Kaelten> |
breaking the laws of temporal physics for the win |
| [20:30:08] |
* |
EnTeQuAk has quit IRC |
| [20:30:27] |
* |
EnTeQuAk has joined #pocoo |
| [20:36:43] |
* |
leche has quit IRC |
| [20:37:22] |
<unlink> |
ossu, asmodai |
| [20:39:28] |
* |
leche has joined #pocoo |
| [20:48:47] |
<mitsuhiko> |
we should start betting which company is liquidated next |
| [20:49:44] |
<sebner> |
lets *hope* for Microsoft xD |
| [20:49:51] |
<mitsuhiko> |
http://finance.google.com/finance?q=WAMU |
|