| [00:22:23] |
* |
davidcramer has quit IRC |
| [00:35:04] |
* |
stifal has quit IRC |
| [01:29:06] |
* |
Severb has joined #pocoo |
| [01:33:19] |
* |
Severb has left #pocoo |
| [04:12:03] |
* |
empty has joined #pocoo |
| [04:32:20] |
* |
mikeyumatov has quit IRC |
| [04:33:08] |
* |
mikeyumatov has joined #pocoo |
| [05:35:57] |
* |
kaelten has joined #pocoo |
| [05:37:06] |
* |
kaelten is now known as Kaelten |
| [06:30:23] |
* |
EnTeQuAk has joined #pocoo |
| [06:51:03] |
* |
EnTeQuAk_ has joined #pocoo |
| [06:51:49] |
* |
EnTeQuAk has quit IRC |
| [07:06:38] |
* |
EnTeQuAk_ is now known as EnTeQuAk |
| [07:41:57] |
* |
mikeyumatov has quit IRC |
| [08:22:39] |
* |
EnTeQuAk has quit IRC |
| [08:44:40] |
<plaes> |
anyone has experience with smtplib? |
| [08:46:19] |
<plaes> |
should it hang when I do: 's = smtplib.SMTP("localhost") ? |
| [08:48:14] |
<plaes> |
hrm.. had to run /usr/bin/newaliases |
| [09:06:14] |
* |
vmx has joined #pocoo |
| [09:57:48] |
<prencher^> |
mitsuhiko - oy, where's the contrib.mail module at? :P |
| [09:59:06] |
<plaes> |
nowhere :) |
| [10:19:10] |
* |
leche has joined #pocoo |
| [10:31:49] |
* |
stifal has joined #pocoo |
| [10:39:04] |
* |
rafael has joined #pocoo |
| [11:03:26] |
<rafael> |
mitsuhiko: ping |
| [11:06:41] |
<mitsuhiko> |
rafael: pong |
| [11:08:16] |
<rafael> |
mitsuhiko: i converted pages_config to the new forms. http://paste.pocoo.org/show/85238/ - but it redirects to admin/options/urls at the end |
| [11:08:48] |
<mitsuhiko> |
rafael: it redirects to the page you are coming from |
| [11:08:55] |
<mitsuhiko> |
that's what your code does at least |
| [11:09:13] |
<mitsuhiko> |
(form.redirect always redirects to the referring page and if there is none to the url rule given) |
| [11:09:17] |
<mitsuhiko> |
use redirect_to |
| [11:09:42] |
<mitsuhiko> |
rafael: btw. where is the second redirect for language changes? |
| [11:09:45] |
<mitsuhiko> |
please don't remove that one! |
| [11:09:57] |
<mitsuhiko> |
ah, that was pages |
| [11:10:05] |
<mitsuhiko> |
yeah. there is none |
| [11:10:07] |
<rafael> |
you mean in the basic options? |
| [11:10:29] |
<rafael> |
yes, i'll try some easier forms and then care about this again. there is this strange bug you remember |
| [11:11:03] |
<mitsuhiko> |
paste the traceback and form please |
| [11:11:07] |
<mitsuhiko> |
i'll try to fix that later |
| [11:11:34] |
<rafael> |
mitsuhiko: so it now redirects to the admin index. is that ok or should it redirect to the come-from-page? |
| [11:14:36] |
<mitsuhiko> |
the same page |
| [11:14:52] |
<mitsuhiko> |
eg, admin/pages_config or how the url rule is called |
| [11:15:00] |
<mitsuhiko> |
just look at what the existing form does |
| [11:17:52] |
<rafael> |
mitsuhiko: change_password does that form.redirect() |
| [11:18:08] |
<mitsuhiko> |
rafael: i mean the existing form for the *same page* |
| [11:18:11] |
<mitsuhiko> |
the one you changed |
| [11:18:17] |
<mitsuhiko> |
change password is a different beast |
| [11:18:29] |
<mitsuhiko> |
that's a site that is designed to redirect back to the page the user came from |
| [11:18:34] |
<mitsuhiko> |
(call it dialog behavior) |
| [11:18:38] |
<mitsuhiko> |
the pages config is a tab |
| [11:18:44] |
<mitsuhiko> |
submit on the tab just saves |
| [11:28:50] |
<rafael> |
mitsuhiko: but then should http://paste.pocoo.org/show/85240/ work. btw, is the werkzeug debugger feature to submit on lodgeit broken? there is still "submitting..." |
| [11:29:44] |
<mitsuhiko> |
rafael: latest werkzeug version? |
| [11:29:56] |
<mitsuhiko> |
your url rule is obviously broken |
| [11:32:50] |
<rafael> |
mitsuhiko: yes, have the current hg tip |
| [11:33:01] |
<mitsuhiko> |
then it works |
| [11:34:14] |
<rafael> |
with the other views in which it is used, yes |
| [11:35:24] |
<rafael> |
it works if i do redirect_to('admin/index') but redirect_to ('admin/options/pages') |
| [11:42:01] |
<mitsuhiko> |
rafael: there is no 'admin/options/pages'... |
| [11:42:10] |
<mitsuhiko> |
please have a look into urls.py to see how the url rule is called |
| [11:42:24] |
<mitsuhiko> |
and please have a look at the *existing code* of the form you are converting |
| [11:42:47] |
<mitsuhiko> |
that already shows how the url rules are called and how the redirecting behavior is supposed to be |
| [11:50:58] |
* |
prencher^ is now known as prencher |
| [12:14:35] |
<asmodai> |
http://vanrees.org/weblog/archive/2008/09/12/python-calculated-coin |
| [12:14:39] |
<asmodai> |
for the story behind that coin |
| [12:17:04] |
<xorAxAx> |
cool |
| [12:26:34] |
* |
rafael has quit IRC |
| [12:31:54] |
* |
EnTeQuAk has joined #pocoo |
| [13:07:37] |
* |
maix has joined #pocoo |
| [13:15:47] |
<prencher> |
is guido on that coin mika? |
| [13:15:48] |
<prencher> |
mitsuhiko* |
| [14:09:01] |
<birkenfeld> |
asmodai: do you buy one of these coins? |
| [14:15:50] |
<mitsuhiko> |
birkenfeld: python.org needs a shirt shop |
| [14:15:55] |
<mitsuhiko> |
and you have to sell py-thongs :D |
| [14:16:00] |
<birkenfeld> |
:D |
| [14:17:41] |
* |
delroth has quit IRC |
| [14:18:24] |
<birkenfeld> |
mitsuhiko: having looked at 2.6 and 3.0 weakref.py, I don't see how list(keys()) in 3k is worse than keys() in 2.x |
| [14:20:37] |
<mitsuhiko> |
birkenfeld: well, it is :) |
| [14:20:44] |
<mitsuhiko> |
apparently list(iter) is not atomic |
| [14:20:53] |
<mitsuhiko> |
atomic as in gil held |
| [14:21:39] |
<birkenfeld> |
mitsuhiko: but 2.x keys() is implemented in Python too |
| [14:22:09] |
<mitsuhiko> |
birkenfeld: but self.data.keys not |
| [14:22:21] |
<asmodai> |
birkenfeld: yes |
| [14:22:24] |
<birkenfeld> |
but that's different |
| [14:22:29] |
<asmodai> |
birkenfeld: I did, also ordered the silver and gold one |
| [14:22:34] |
<mitsuhiko> |
birkenfeld: in what way? |
| [14:22:45] |
<mitsuhiko> |
the problem is that the internal dict in the weak key dictionary changes during iteration |
| [14:22:48] |
<birkenfeld> |
mitsuhiko: you have to specify that you call .data.keys(), not .keys() |
| [14:22:51] |
<mitsuhiko> |
which breaks list(keys()) |
| [14:22:54] |
<mitsuhiko> |
birkenfeld: why? |
| [14:23:06] |
<mitsuhiko> |
data is the problem, not the weak key dictionary |
| [14:23:27] |
<birkenfeld> |
ah, strike that, it calls keys() too |
| [14:23:30] |
<mitsuhiko> |
self.data.keys() in py2 <- works | breaks -> list(self.data.keys()) in py3 |
| [14:23:36] |
<birkenfeld> |
ok. but nick just said list() is atomic... |
| [14:23:52] |
<mitsuhiko> |
birkenfeld: have you seen the testcase i attached? |
| [14:24:06] |
<mitsuhiko> |
birkenfeld: http://article.gmane.org/gmane.comp.python.devel/97289 |
| [14:25:33] |
<birkenfeld> |
3k keys() should use list() internally |
| [14:25:46] |
<birkenfeld> |
that should fix it |
| [14:26:12] |
<mitsuhiko> |
it does not? ah. that would explain it |
| [14:29:13] |
<mitsuhiko> |
birkenfeld: yep. that seems to fix it |
| [14:31:58] |
<mitsuhiko> |
birkenfeld: i = iter(d.keys()); d["foo"] = "bar"; next(i) is safe i assume? |
| [14:32:05] |
<mitsuhiko> |
eg: modification before first next() call |
| [14:32:52] |
<birkenfeld> |
mitsuhiko: nope |
| [14:32:57] |
<Leonidas> |
asmodai: you mean the python-coins? |
| [14:33:13] |
<mitsuhiko> |
birkenfeld: then list(keys()) could still break if the thread switch between list and keys() happens |
| [14:33:16] |
<Leonidas> |
asmodai: I also want one, but I'm not sure whether they deliver to germany |
| [14:33:19] |
<birkenfeld> |
asmodai: a pity, else you could have ordered one for me |
| [14:33:25] |
<mitsuhiko> |
unlikely, but possible |
| [14:33:33] |
<birkenfeld> |
mitsuhiko: no |
| [14:33:45] |
<birkenfeld> |
mitsuhiko: list() calls iter() |
| [14:34:05] |
<mitsuhiko> |
ah right. it's not an iterator |
| [14:34:59] |
<birkenfeld> |
Leonidas: "only one per household" doesn't sound like they would do that for non-Netherlands... |
| [14:35:37] |
<mitsuhiko> |
grid coin buying |
| [14:35:50] |
<mitsuhiko> |
people not interested in the coin register themselves on a website... |
| [14:36:00] |
<mitsuhiko> |
and each one who wants a coin is one slot^Whousehold assigned |
| [14:36:32] |
<Leonidas> |
birkenfeld: I wrote them a mail yesterday. Their contact form is borked enough not to accept any postal code from germany (doesn't work with amsterdams postal code either) |
| [14:36:57] |
<Leonidas> |
birkenfeld: maybe asmodai has some friends who haven't yet bought one? :D |
| [14:37:38] |
<Leonidas> |
mitsuhiko: "Click here to register that you are not interested in buying the coin for yourself" :) |
| [14:39:19] |
* |
EnTeQuAk has quit IRC |
| [14:39:28] |
<Leonidas> |
damn, the django admin sometimes really crapware |
| [14:40:05] |
<asmodai> |
the silver coated coins are limited to 1 each Dutch household |
| [14:40:23] |
<asmodai> |
I could always order one on my parents' house if they don't want it |
| [14:40:36] |
<asmodai> |
otherwise you get the more expensive ones: full silver, which is like EUR 18 |
| [14:40:42] |
<asmodai> |
or the gold one, which is like EUR 30 |
| [14:41:24] |
<Leonidas> |
the gold one is definitely too expensive for me |
| [14:41:41] |
<birkenfeld> |
asmodai: well, silver coated would be enough for me :) |
| [14:41:50] |
<birkenfeld> |
it's not the metal that's interesting |
| [14:43:35] |
<mitsuhiko> |
seid ihr jetzt alle münzgeil? :) |
| [14:43:42] |
<mitsuhiko> |
it's just a coin ;) |
| [14:43:49] |
<birkenfeld> |
mitsuhiko: yes, but finally a coin that is interesting |
| [14:44:11] |
<Leonidas> |
mitsuhiko: but it is a python-coin, which makes the thing an awesome fan-article :) |
| [14:44:12] |
<mitsuhiko> |
birkenfeld: have you seen the 09 edition of the uk coins? they are pretty neato too |
| [14:44:20] |
<Leonidas> |
CCTV? |
| [14:44:24] |
<birkenfeld> |
mitsuhiko: indeed |
| [14:45:42] |
<mitsuhiko> |
Leonidas: http://www.royalmint.com/newdesigns/designsRevealed.aspx |
| [14:46:59] |
<Leonidas> |
mitsuhiko: ah, right, I remember seeing them. Nice, but I don't have enough money to buy every coin I'd like :) |
| [15:02:37] |
* |
izibi has joined #pocoo |
| [15:08:20] |
<empty> |
is there any way in jinja2 to let the parent template know something about the child template? I tried a {%set%} tag but it doesn't see it. |
| [15:11:57] |
<apollo13> |
empty: set the variable in the parent template (use a list for instance) and append to it |
| [15:12:33] |
<empty> |
apollo13: hmm yeah that should work. I will try it thanks. This is the one feature of mako that I really like. |
| [15:12:49] |
<apollo13> |
I am already talking a look, how we achieve it |
| [15:14:23] |
<empty> |
with mako I can ask the child if it renders any content by just checking if the block was called in the child. |
| [15:15:08] |
<empty> |
I thought about creating my own block that automatically sets a flag but some might think that's magic. :) |
| [15:16:46] |
<apollo13> |
hmm we set the variables in the child and use them in the parent |
| [15:17:11] |
<mitsuhiko> |
hi empty :) |
| [15:17:37] |
<empty> |
hi mitsuhiko are you enjoying EuroPycon |
| [15:17:48] |
<mitsuhiko> |
empty: child templates are executed before parent templates |
| [15:17:57] |
<mitsuhiko> |
so you can access the variables defined in a child template in the parent |
| [15:18:07] |
<empty> |
mitsuhiko: hmm, it's not working for me. |
| [15:18:40] |
<empty> |
I guess I'll have to dig further into why it's not happening. |
| [15:18:53] |
<mitsuhiko> |
empty: you must not override it in the parent of course |
| [15:18:53] |
<apollo13> |
http://simonwillison.net/2008/Sep/13/django/ cool :) |
| [15:19:53] |
<mitsuhiko> |
empty: http://paste.pocoo.org/show/85250/ |
| [15:20:25] |
<empty> |
mitsuhiko: oh I can't just use {% if page_title %} |
| [15:20:37] |
<mitsuhiko> |
sure, should work |
| [15:20:42] |
<mitsuhiko> |
does work :) |
| [15:20:56] |
<apollo13> |
mitsuhiko: depending on the undefined behaviour, or? |
| [15:21:03] |
<mitsuhiko> |
yep |
| [15:21:05] |
<apollo13> |
if page_title would work for strict |
| [15:21:06] |
<apollo13> |
ok |
| [15:21:20] |
<empty> |
oh |
| [15:21:40] |
<empty> |
so is there any way to check if the block is defined in the child? |
| [15:21:53] |
<empty> |
like {% if submenu is not defined %} |
| [15:22:10] |
<empty> |
or do I need to have the set |
| [15:23:09] |
<mitsuhiko> |
empty: http://paste.pocoo.org/show/85251/ |
| [15:23:19] |
<mitsuhiko> |
empty: {% if not self.submenu %} |
| [15:24:21] |
<apollo13> |
the highlighting is kinda wierd |
| [15:24:45] |
<mitsuhiko> |
apollo13: was too lazy to create multiple pastes :) |
| [15:25:03] |
<apollo13> |
yeah but it's python isn't it? |
| [15:25:05] |
<empty> |
mitsuhiko: okay well thank you that solves a lot of problems for me :) |
| [15:25:22] |
<apollo13> |
{% endblock %} <-- why is e kursiv? |
| [15:25:28] |
<apollo13> |
italic* |
| [15:25:36] |
<empty> |
haha |
| [15:25:38] |
<mitsuhiko> |
apollo13: % e is a valid escape code |
| [15:25:47] |
<apollo13> |
even with a space between? |
| [15:25:52] |
<apollo13> |
didn't know that |
| [15:26:04] |
<mitsuhiko> |
the best one is this here: |
| [15:26:04] |
<mitsuhiko> |
>>> "%(foo) %" % {'foo': 'great hah?'} |
| [15:26:04] |
<mitsuhiko> |
'%' |
| [15:26:20] |
<mitsuhiko> |
great fun in gettext files :-/ |
| [15:26:26] |
<apollo13> |
ihm |
| [15:26:29] |
<apollo13> |
uhm* |
| [15:26:32] |
<mitsuhiko> |
like. "%(author) submitted %(article)s" |
| [15:26:38] |
<mitsuhiko> |
well. that one works |
| [15:26:51] |
<mitsuhiko> |
like. "%(title) %(subject)s:" |
| [15:27:06] |
<mitsuhiko> |
>>> "%(title) %(subject)s:" % {'title': '', 'subject': ''} |
| [15:27:07] |
<mitsuhiko> |
'%(subject)s:' |
| [15:27:45] |
<apollo13> |
why's that? |
| [15:28:00] |
<mitsuhiko> |
escaping is implemented not as % doubling but with % as format character |
| [15:28:07] |
<mitsuhiko> |
so %(foo)% is actually the very same as %% |
| [15:28:20] |
<mitsuhiko> |
of course %(foo) % too because " " is a formatting modifier |
| [15:28:38] |
* |
apollo13 googles for python format string |
| [15:29:31] |
<apollo13> |
outch that hurts |
| [15:29:40] |
<apollo13> |
how to work around it? |
| [15:29:56] |
<mitsuhiko> |
why work around? just use %(foo)s %(bar)s instead of %(foo) %(bar)s :) |
| [15:30:03] |
<mitsuhiko> |
and babel has a format string checker to detect such errors |
| [15:30:37] |
<apollo13> |
ic |
| [15:32:01] |
<apollo13> |
that explains some of my problems I had with django :/ |
| [15:32:26] |
* |
izibi_ has joined #pocoo |
| [15:32:33] |
* |
izibi_ has quit IRC |
| [15:33:05] |
<mitsuhiko> |
empty: speaking of mako, during the jinja2 design phase i thought about going with the mako scoping rules, but they are so complex, i think that would confuse designers |
| [15:33:19] |
<mitsuhiko> |
i think not even zzzeek fully understands the mako scoping |
| [15:33:20] |
<empty> |
mitsuhiko: agreed on the complex |
| [15:33:46] |
<empty> |
mitsuhiko: everytime I work with it my head hurts. |
| [15:35:35] |
* |
izibi is now known as izibi_ |
| [15:35:42] |
<apollo13> |
Declarative is recommended for applications which don't require (and don't prefer) abstraction between tables and mappers |
| [15:35:46] |
<apollo13> |
(sql docs) |
| [15:35:51] |
<apollo13> |
sqlalchemy* |
| [15:36:04] |
<apollo13> |
so they already prefer it *hmm* |
| [15:36:14] |
<apollo13> |
when do I require table objects? |
| [15:36:46] |
<apollo13> |
I guess never :) |
| [15:36:57] |
<mitsuhiko> |
apollo13: by now |
| [15:36:59] |
<mitsuhiko> |
took a while |
| [15:37:00] |
<empty> |
apollo13: yeah have you seen zzzeek's latest post. |
| [15:37:09] |
<apollo13> |
empty: no (link) |
| [15:37:37] |
<apollo13> |
I think I'll base genericadmin on them |
| [15:38:11] |
* |
izibi_ is now known as izibi |
| [15:38:12] |
<empty> |
http://techspot.zzzeek.org/?p=30 |
| [15:38:18] |
<apollo13> |
merci |
| [15:38:44] |
<empty> |
"To demonstrate EXISTS, let's build a table. We're using declarative, which is pretty much the only way I roll these days (hey, better late than never....):" |
| [15:39:26] |
<apollo13> |
woot |
| [15:39:39] |
<apollo13> |
so tables are getting somewhat useless |
| [15:39:50] |
<empty> |
I like declarative but I actually still use tables for most of my stuff. |
| [15:40:15] |
<empty> |
the reason is because it's more flexible and I'd rather have to not go back and change it later if I need to. |
| [15:40:19] |
<apollo13> |
Oh, I hate it to look up the mapper definitions all the time |
| [15:41:06] |
<empty> |
also like with association proxy i couldn't figure out how to make it work. I probably could if I took the time. |
| [15:41:25] |
<apollo13> |
ask zeek :) |
| [15:41:35] |
<apollo13> |
zzzeek* |
| [15:41:35] |
<empty> |
he's tired of me bugging him :D |
| [15:41:37] |
<apollo13> |
hate this name |
| [15:41:45] |
<apollo13> |
I can ask him ;) |
| [15:42:06] |
<empty> |
Overall I'm a total fan of declarative. |
| [15:42:12] |
<empty> |
and we're using it as the core for dj-sa |
| [15:42:19] |
<apollo13> |
any progress? |
| [15:42:27] |
<empty> |
backwards :P |
| [15:42:53] |
<apollo13> |
... |
| [15:42:55] |
<empty> |
all the changes in .5 sa and 1.0 django has made a lot of tough probs to work around. |
| [15:43:08] |
<empty> |
like all my values work is broke and I'm fixing it up |
| [15:43:10] |
<apollo13> |
I see |
| [15:43:22] |
<apollo13> |
but know you've got stable libs |
| [15:43:30] |
<empty> |
.5 changed values to not be generative and to use a generator |
| [15:43:31] |
<apollo13> |
.5 will be used for some time |
| [15:43:41] |
<empty> |
apollo13: yes it will be good now |
| [15:43:45] |
<apollo13> |
and django will stay forever at 1.0 *runs* |
| [15:44:20] |
<empty> |
hehe |
| [15:45:07] |
<apollo13> |
how are you going to implement ./manage.py sqlall and connection.queries? |
| [15:45:35] |
<empty> |
sqlall we pretty much have. |
| [15:45:40] |
<empty> |
just used a mock strategy |
| [15:45:47] |
<empty> |
i believe. |
| [15:46:01] |
<empty> |
connection.queries i have not tackled yet |
| [15:46:30] |
<Leonidas> |
apollo13: you are really writing this genericadmin? |
| [15:46:46] |
<apollo13> |
Leonidas: thinking more and more of it by now |
| [15:47:03] |
<apollo13> |
empty: strategy="mock", <-- looks like mocking yeah ;) |
| [15:47:24] |
<empty> |
yah |
| [15:47:38] |
<Leonidas> |
apollo13: hmm, the more I have to mess with the django-stuff the more I think I need something better. |
| [15:48:08] |
<apollo13> |
hmm strategy mock isn't documented :/ |
| [15:48:13] |
<Leonidas> |
the only other thing that exists is d??sprockets but this is crappy. |
| [15:48:58] |
<apollo13> |
url? |
| [15:51:52] |
<benoitc> |
mmm i've a pb to understand how subdomain rules work on werkzeug. I have this map : http://friendpaste.com/VVtYRnAN but alias is never set when I try test.mydomain.local , www.mydomain.local, whatever.mydomain.local i always use rules above subdomain |
| [15:52:01] |
<benoitc> |
any idee where I'm wrong ? |
| [15:57:26] |
<Leonidas> |
apollo13: http://code.google.com/p/dbsprockets/wiki/DBMechanic |
| [15:57:44] |
<apollo13> |
thx |
| [15:58:03] |
<apollo13> |
well that's not enduser useable ;( |
| [15:59:27] |
<asmodai> |
weirdos! |
| [15:59:41] |
<prencher> |
asmodai! |
| [16:00:07] |
* |
izibi_ has joined #pocoo |
| [16:00:20] |
<empty> |
Leonidas: does TG actually use that piece of crap? |
| [16:01:20] |
<apollo13> |
I don't think so |
| [16:01:34] |
<Leonidas> |
empty: don't ask me, I have left TG-land long time ago |
| [16:01:56] |
<empty> |
Mark talked about some awesome admin they have. |
| [16:01:58] |
<empty> |
I hope that's not it. |
| [16:01:59] |
<empty> |
:P |
| [16:02:20] |
<asmodai> |
prencher: :D |
| [16:02:35] |
<apollo13> |
that was called catwalk |
| [16:02:36] |
<apollo13> |
wasn't it? |
| [16:02:41] |
<empty> |
oh was it |
| [16:02:53] |
<apollo13> |
http://docs.turbogears.org/1.0/Catwalk |
| [16:02:55] |
<apollo13> |
I think so |
| [16:03:03] |
<empty> |
yeah |
| [16:03:08] |
<apollo13> |
but still table based |
| [16:03:23] |
<Leonidas> |
yeah, catwalk. But it is limited to SO, no? |
| [16:03:34] |
<apollo13> |
I thought the use sa now |
| [16:03:37] |
<empty> |
SO? |
| [16:03:41] |
<empty> |
oh |
| [16:03:44] |
<apollo13> |
sql object |
| [16:04:01] |
<apollo13> |
It is database agnostic, all it's information is pulled out of SQLObject <-- lol |
| [16:05:02] |
<apollo13> |
oO google knows me |
| [16:05:22] |
<apollo13> |
returns me to werkzeug.pocoo.org for a werkzeug feeling lucky search |
| [16:07:09] |
<prencher> |
apollo13 - if you're logged in and web history is enabled, it pulls on that for your search results |
| [16:07:14] |
<prencher> |
its eerie |
| [16:07:49] |
* |
leche has quit IRC |
| [16:07:50] |
<apollo13> |
prencher: I am certainly not logged in at google |
| [16:08:17] |
<prencher> |
if you are logged into gmail you're logged into google, just in case |
| [16:08:40] |
<prencher> |
although.. pocoo werkzeug is the first hit for me so.. |
| [16:09:01] |
<apollo13> |
yeah, cause they log ip and searches.... |
| [16:09:05] |
<apollo13> |
that's what I think |
| [16:09:09] |
<prencher> |
mitsuhiko - guess you jumped up a few pageranks buddy! |
| [16:09:46] |
<prencher> |
apollo13 - you're being awfully paranoid, they only base their search on personal info if you use their webhistory |
| [16:10:01] |
<apollo13> |
and I don't use it |
| [16:10:16] |
<apollo13> |
actually google knows what I want |
| [16:10:23] |
* |
vmx has quit IRC |
| [16:10:30] |
<prencher> |
no, and as i just said.. looks like werkzeug ranks at the top for 'werkzeug' |
| [16:10:34] |
<prencher> |
feeling lucky just takes the top hit |
| [16:10:35] |
<apollo13> |
let's assume I search for something and it's available in two contexts |
| [16:10:46] |
<apollo13> |
prencher: I know, but werkzeug was just an exmaple for now |
| [16:10:57] |
<apollo13> |
and I want to have the programming context |
| [16:11:12] |
<apollo13> |
after a few searches I don't even get the results in the other contexts |
| [16:11:21] |
<apollo13> |
google knows what I like to see ;) |
| [16:11:27] |
<prencher> |
i bet it's empty, you know |
| [16:11:28] |
<apollo13> |
and no, I am not paranoid |
| [16:11:31] |
<prencher> |
he's a google borg now |
| [16:11:44] |
<apollo13> |
and I don't have a problem with it at all |
| [16:11:51] |
<prencher> |
they implanted everybody going to djangocon, they're feeding info without even knowing it |
| [16:12:18] |
<apollo13> |
I propose to kick empty ^^ |
| [16:12:23] |
<empty> |
haha |
| [16:12:27] |
<prencher> |
we'd have to get rid of mitsuhiko too |
| [16:12:32] |
<empty> |
I ate the google ice cream |
| [16:12:32] |
<prencher> |
he's got a ms.net borg implant |
| [16:12:51] |
<prencher> |
apollo13 - those "vacations" he went on |
| [16:12:57] |
<apollo13> |
lol |
| [16:14:22] |
<steg> |
ok i likes mercurial :) |
| [16:15:17] |
<Leonidas> |
oh, right, werkzeug is really the first google hit. |
| [16:16:24] |
* |
izibi has quit IRC |
| [16:18:40] |
* |
izibi_ is now known as izibi |
| [16:22:16] |
* |
izibi_ has joined #pocoo |
| [16:23:06] |
<mitsuhiko> |
prencher: write a patch :) |
| [16:23:18] |
<mitsuhiko> |
[was: dns lookups for logging] |
| [16:23:42] |
* |
izibi_ has quit IRC |
| [16:23:48] |
* |
izibi_ has joined #pocoo |
| [16:26:12] |
* |
izibi has quit IRC |
| [16:26:38] |
* |
izibi_ is now known as izibi |
| [16:30:12] |
* |
leche has joined #pocoo |
| [16:30:52] |
* |
prencher^ has joined #pocoo |
| [16:30:53] |
* |
izibi_ has joined #pocoo |
| [16:33:01] |
* |
izibi_ has quit IRC |
| [16:33:52] |
* |
izibi_ has joined #pocoo |
| [16:35:12] |
* |
izibi_ has quit IRC |
| [16:36:34] |
* |
izibi_ has joined #pocoo |
| [16:37:29] |
* |
izibi__ has joined #pocoo |
| [16:37:33] |
<benoitc> |
anyone for subdomain stuff ? i can't have it work at all. seem i can't play with regex and subdomain |
| [16:38:20] |
<benoitc> |
map : http://friendpaste.com/VVtYRnAN |
| [16:39:00] |
<apollo13> |
benoitc: the map enough won't help I guess |
| [16:39:11] |
<apollo13> |
we need to see how you bind the adapter to the environment etc |
| [16:41:02] |
<benoitc> |
http://www.friendpaste.com/2h7UmaSh is the application object |
| [16:44:45] |
<apollo13> |
benoitc: If you don’t provide it, Werkzeug will use SERVER_NAME and SERVER_PORT (or HTTP_HOST if provided) as used server_name with disabled subdomain feature. |
| [16:44:51] |
<apollo13> |
http://werkzeug.pocoo.org/documentation/routing |
| [16:44:58] |
<apollo13> |
look at the docs for bind_to_environ |
| [16:45:28] |
<benoitc> |
if i don't provide what ? |
| [16:45:42] |
<benoitc> |
the default_subdomain ? |
| [16:45:52] |
<benoitc> |
i provide it it walywais use default |
| [16:45:53] |
<apollo13> |
dunno, never used it |
| [16:45:58] |
<apollo13> |
... |
| [16:46:01] |
<apollo13> |
read the docs |
| [16:46:07] |
<apollo13> |
it will disable subdomains then |
| [16:46:09] |
<apollo13> |
iirc |
| [16:46:30] |
<benoitc> |
yes so i try some otherthing like the stuff i pasted. |
| [16:46:42] |
<benoitc> |
anyway the doc isn't very explicit on this point |
| [16:46:55] |
<benoitc> |
will check the code so |
| [16:46:56] |
<apollo13> |
look at the source ;( |
| [16:47:03] |
<benoitc> |
yeah sure |
| [16:47:20] |
* |
izibi has quit IRC |
| [16:48:31] |
* |
prencher has quit IRC |
| [16:54:21] |
* |
izibi_ has quit IRC |
| [17:21:10] |
* |
izibi__ has quit IRC |
| [17:21:23] |
* |
izibi has joined #pocoo |
| [17:35:25] |
* |
izibi_ has joined #pocoo |
| [17:37:19] |
<saptah> |
¿how can I donwload the shorty example? thanks |
| [17:37:49] |
* |
izibi_ is now known as izibi__ |
| [17:38:19] |
* |
izibi__ is now known as izibi___ |
| [17:38:30] |
* |
izibi has quit IRC |
| [17:38:36] |
* |
izibi___ is now known as izibi |
| [17:39:24] |
<Leonidas> |
saptah: its here: http://dev.pocoo.org/projects/werkzeug/browser/examples/shorty |
| [17:40:09] |
<saptah> |
Leonidas and, for download all the directory? |
| [17:40:34] |
<saptah> |
I mean, a tar.gz or so. |
| [17:40:53] |
<Leonidas> |
saptah: you can do a mercurial checkout of that repository. |
| [17:41:57] |
<Leonidas> |
saptah: or you can take the normal release tarball |
| [17:42:02] |
<Leonidas> |
http://pypi.python.org/packages/source/W/Werkzeug/Werkzeug-0.3.1.tar.gz#md5=6119c0d9084cebc4103969616c9ac2ba |
| [17:42:26] |
<saptah> |
I did hg clone http://dev.pocoo.org/hg/examples/shorty but doesn't work |
| [17:43:04] |
<Leonidas> |
saptah: hg clone http://dev.pocoo.org/hg/werkzeug-main |
| [17:43:09] |
<Leonidas> |
hg != svn |
| [17:43:57] |
<saptah> |
I really don't know anything about hg :) |
| [17:44:24] |
<saptah> |
I've got the realease. thanks |
| [17:44:49] |
<ronny> |
well, lets just say if you keep using hg for some time you never want to go back to dirty svn |
| [17:45:00] |
<TheSheep> |
saptah: you are lucky, hg was designed for people who don't know anything about hg :) |
| [17:45:37] |
<saptah> |
but this works: hg clone http://dev.pocoo.org/hg/werkzeug-main |
| [18:02:32] |
<Leonidas> |
sure it works, I said it's going to work |
| [18:23:20] |
* |
prencher^ is now known as prencher |
| [18:28:06] |
<benoitc> |
mmm i think ther's somtheing worng with subdomain management. currently subdobmain is found depending on environ['SERVER_NAME'], it should depends on environ['HTTP_HOST'] amha. If i don't do this if i set in /etc/hosts 127.0.0.1 mydomain.com test.mydomain.com subdomain is always empty since environ['SERVER_NAME'] is always mydomain.com |
| [18:28:16] |
<benoitc> |
with this patch : http://www.friendpaste.com/Y36ZgkCF it works |
| [18:33:55] |
<benoitc> |
test was done on runserver |
| [18:47:35] |
<plaes> |
hum.. which of these wsgi, fcgi, scgi do you guys recommend? :P |
| [18:53:47] |
* |
plaes goes with wsgi... |
| [18:54:03] |
* |
delroth has joined #pocoo |
| [18:58:48] |
<apollo13> |
plaes: you are going with mod_wsgi, fcgi and scgi go over wsgi too |
| [19:00:01] |
* |
izibi_ has joined #pocoo |
| [19:02:37] |
* |
izibi has quit IRC |
| [19:02:43] |
* |
izibi_ is now known as izibi |
| [19:54:29] |
<plaes> |
mitsuhiko: jinja2 doesn't seem to handle {% extends "../layout.tmpl" %} correctly.. |
| [19:56:23] |
<plaes> |
at least under mod_wsgi |
| [20:10:41] |
* |
Spads has joined #pocoo |
| [20:11:10] |
<mitsuhiko> |
plaes: testcase? |
| [20:11:26] |
<mitsuhiko> |
plaes: eh. path's are not joined by default |
| [20:11:30] |
<mitsuhiko> |
you can change that if you want |
| [20:12:11] |
<mitsuhiko> |
def join_path(template, parent): return os.path.join(template, parent) |
| [20:12:26] |
<mitsuhiko> |
env.join_path = join_path |
| [20:14:59] |
<mitsuhiko> |
plaes: http://paste.pocoo.org/show/85269/ |
| [20:15:21] |
* |
Spads has left #pocoo |
| [20:15:24] |
<mitsuhiko> |
because per default no joining takes place and you have to provide the template names pseudo-absolute |
| [20:17:56] |
<plaes> |
this ^^ doesn't seem to be the right fix |
| [20:18:11] |
<plaes> |
+ it has a syntax error |
| [20:18:45] |
<plaes> |
outcome is: ../layout.tmpl/download/index.html |
| [20:19:27] |
<apollo13> |
mitsuhiko: is path_info absolute or relative to base_url? |
| [20:20:27] |
<mitsuhiko> |
apollo13: context? |
| [20:20:32] |
<apollo13> |
adapter.match? |
| [20:20:44] |
<mitsuhiko> |
path_info is relative to server_name + script_name |
| [20:20:46] |
<apollo13> |
I bound the map to localhost and /admin as baseurl |
| [20:20:47] |
<apollo13> |
or |
| [20:20:49] |
<apollo13> |
ok* |
| [20:20:56] |
<mitsuhiko> |
actually, not relative |
| [20:20:57] |
<apollo13> |
script_name == base_url |
| [20:21:01] |
<mitsuhiko> |
concatenative |
| [20:21:08] |
<mitsuhiko> |
or how you want to call it |
| [20:23:18] |
<plaes> |
any ideas how to usecase this? |
| [20:23:27] |
<plaes> |
because it worked with jinja1 |
| [20:23:34] |
<apollo13> |
ok, think I got it |
| [20:24:53] |
<mitsuhiko> |
plaes: impossible, jinja1 has no joining either :) |
| [20:24:57] |
<mitsuhiko> |
if it worked. by accident |
| [20:25:12] |
<plaes> |
http://paste.pocoo.org/show/85272/ |
| [20:25:28] |
<mitsuhiko> |
plaes: yes. do you know why that worked? |
| [20:25:37] |
<mitsuhiko> |
because jinja1 stripped ".." away and "layout.html" was left |
| [20:25:41] |
<plaes> |
no idea :) |
| [20:25:55] |
* |
izibi_ has joined #pocoo |
| [20:25:57] |
<mitsuhiko> |
{% extends "layout.html" %} always was and still is the way to go :) |
| [20:26:20] |
<plaes> |
ah.. so it doesn't take relative but absolute template dir.. |
| [20:26:26] |
<mitsuhiko> |
exactly |
| [20:27:04] |
<plaes> |
ah, thanks :) |
| [20:28:19] |
* |
izibi has quit IRC |
| [20:28:21] |
* |
izibi_ is now known as izibi |
| [20:30:30] |
* |
izibi_ has joined #pocoo |
| [20:47:03] |
* |
izibi has quit IRC |
| [20:51:56] |
<plaes> |
ah.. your patch is rev2 :) |
| [20:52:00] |
<plaes> |
not v3 :D |
| [21:05:10] |
* |
izibi_ is now known as izibi |
| [21:06:46] |
<plaes> |
hrm.. wrong channel ^^ |
| [21:25:44] |
<apollo13> |
mitsuhiko: and what's groupby in mako? or do I need to code my own |
| [21:25:56] |
* |
izibi_ has joined #pocoo |
|