2008-3-30

23:16 Magus-
sounds like you forgot to set your pythonpath properly
23:16 thebitguru
23:16 Xore
thebitguru: i was reading the spec and it seems there's a deprecated many-queries functionality in execute(), i was wondering if that might be interfering
23:16 defrex
thebitguru: thanks
23:17 Xore
but it seems unlikely if your .queries outptu is correct
23:17 Xore
s/outptu/output/;
23:17 thebitguru
defrex: I have written my own version which assumes that your scripts are living inside the project. http://www.pastethat.com/Si3cO
23:18 thebitguru
Xore: yeah, the behavior is really weird
23:19 defrex
thebitguru: cool, thanks
23:20 ameriblog1
Magus- got this, works, but i tried to put a - in front of pub_date to get it to order the other way and it didn't work. {% for news in object.news_set.all|slice:":10"|dictsort:"pub_date" %}
23:20 RaceKondition
got the permalink decorator to work, but what confuses me is how is it supposed to be reusable if takes a absolute name of a view?
23:21 Magus-
RaceKondition: because a view name doesn't change
23:21 Magus-
the url for that view might
23:21 Magus-
ameriblog1: you can solve the date sorting also by editing your default sort order for news
23:21 ameriblog1
Magus- got it, never mind, i apolizie
23:22 RaceKondition
Magus-: so.. the reusability of the app is determined by whether it is embedded in a project or a standalone app? because project app's view names might change..
23:22 mattmcc
Generally one doesn't put stuff intended to be reused within a project.
23:22 RaceKondition
yeah, true
23:23 Magus-
indeed, so the point is moot
23:29 tobias
can i compare the result of a filter with ifequal? it doesn't seem to be working.
23:30 tobias
e.g., {% ifequal types|index:forloop.counter0 "number" %}
23:31 isleshocky77
can you get access to the logged in user in the template without passing it in from the view? Is there a special way to get to it?
23:31 tobias
"{{ types|index:forloop.counter0 }}" prints "number" exactly
23:31 thunderbolt
So, if you're developing a reusable app, do you just move it outside of hte test project?
23:31 Magus-
isleshocky77: no, though you can sort of automate the passing
23:31 Magus-
isleshocky77: use RequestContext and context processors can supply data to templates
23:32 Magus-
tobias: no, ifequal does not currently support filters - known issue, will be fixed :)
23:32 tobias
Magus-: cool, thanks.
23:32 Magus-
if you don't mind applying patches you can fix it now
23:33 Magus-
#5756
23:33 DjangoBot
23:34 tobias
ah workaround looks nice
23:34 belred
i know apache/mod_python is the preferred setup according to the docs. i wanted to know if others are using lighttpd/fastcgi in production for django
23:34 Magus-
I'm sure people are
23:34 Magus-
others use apache/mod_wsgi
23:35 wolfe
irk
23:35 mattmcc
Viva mod_wsgi
23:35 wolfe
actually the better method is nginx/mod_wsgi ;)
23:35 tobias
I'm really tempted to try WSGI. it looks hot.
23:35 thunderbolt
belred: I'm using fastcgi with flup with good success. But I'm living in the shared hosting ghetto ;-)
23:35 thunderbolt
FastCGI with Apache, mind you.
23:35 wolfe
thunderbolt: how silly
23:35 thunderbolt
wolfe: Which part?
23:35 belred
geez... any two people here with the same setup???
23:36 wolfe
shared hosting, you should pay me to set you up with a VPS ;)
23:36 thunderbolt
wolfe: Ooh, does your business have a website with prices?
23:37 wolfe
not up yet. corporeal has a few VPSs here with me that is the only customer which isn't in town :)
23:37 thunderbolt
Ah
23:37 belred
i can set up a production system anyway i want to. i was hoping there was a clear answer which was the best for speed and robustness
23:37 thunderbolt nods
23:37 wolfe
thunderbolt: if you do go for a VPS though, use a Xen provider
23:37 axiak
belred: they all have tradeoffs and advantages...
23:37 wolfe
you'll find places which use UML or Virtuozzo will screw clients over
23:38 thunderbolt nods
23:38 thunderbolt
Thanks for the advice.
23:38 tobias
belred: i'm using apache/mod_python right now, but the fact that I have to restart apache when I update a django app just sucks. I'm looking for alternatives too.
23:38 wolfe
people who use virtuozzo don't limit how many people are on a server, just liek shared hosting. With Xen, it is more static to offer a allocated amount of memory
23:38 axiak
tobias: you'll always have to restart the code no matter what you use
23:39 tobias
axiak: yes, but some options let you restart just the app, and, furthermore, don't break incoming requests for a few seconds :)
23:39 wolfe
tobias: what? no
23:39 thunderbolt
wolfe: I wish I remembered which VM they used at work, *smacks head*, I thought it was from Novell...
23:39 thunderbolt
VMware.
23:39 tobias
WSGI being one of those
23:39 axiak
tobias: well it's not like you should be hosting anything else from that apache/mod_python service :)
23:39 thunderbolt
Be back later, my meal has dinged out of the microwave.
23:40 wolfe
you don't realize how apache works then nor any other daemon. daemons finish the request before ending the daemon
23:40 greenskeleton
wolfe: what plans are you offering for VPS's?
23:40 belred
what is the downside to using lighttpd/fastcgi for dynamic content?
23:40 tobias
axiak: I should run a separate copy of apache for every django app?
23:40 wolfe
tobias: you don't have much of a clue on how to cycle http daemons
23:40 tobias
wolfe: how should i be doing it?
23:40 wolfe
tobias: you set it to port 2344 on 127.1, if you need to restart gracefully, set in the config to port 2345
23:40 axiak
tobias: well it depends...at least a large segment of your code, yes
23:40 wolfe
if you HUP nginx, it will gracefully restart, same with apache
23:41 wolfe
it will finish the requests BEFORE shutting down the old config
23:41 wolfe
it is up to the admin to update the application correctly
23:41 tobias
wolfe: will port 80 always be open?
23:41 axiak
tobias: I mean mod_python really starts to suck when you have many projects...but for one it's not like you'd be serving more than one code base anyway...
23:41 wolfe
tobias: yes, it still accepts requests
23:42 tobias
axiak: but i am :)
23:42 wolfe sighs
23:42 tobias
wolfe: i'll try that, instead of a hard restart. thanks.
23:42 axiak
tobias: hence one of the tradeoffs of mod_python... :)
23:42 axiak
tobias: but the tradeoff is certainly _not_ that you have to restart your code :)
23:42 wolfe
greenskeleton: I do yes. shared hosting too, but I only have my own web customers in the shared VPS :)
23:42 wolfe
which is what has been keeping me from finishing dancingroo
23:42 axiak
tobias: it's that it doesn't allow you to break down projects into separate processes...
23:44 belred
is there a speed difference for apache/mod_python and lighttpd/fastcgi for dynamic content? i head lighttpd is faster for static content
23:45 axiak
belred: there is a slight overhead for having multiple daemons using fastcgi/wsgi...but it's heavily amortized
23:45 axiak
belred: I think you'll find mod_python uses more memory but does better with higher concurrency and is single threaded
23:46 axiak
while you can try things like using multithreaded wsgi to get high concurrency with lower memory otherwise
23:46 belred
memory won't be a problem for me... i'll just put 8+ MB ram on this machine
23:47 axiak
belred: what performance are you looking for?
23:47 belred
i think 100+ req/sec is reasonable
23:47 belred
i'll only put one project on it
23:48 axiak
belred: what concurrency?
23:48 belred
you mean number of simultaneous users?
23:48 axiak
sure
23:49 axiak
belred: like, when you use ab -c XXX -n YYY
23:50 belred
i don't remember seeing those numbers... i'm sure it's in the 1000's
Page 27 of 28   ← Previous  Next →(2,710 total)