Re: new Django site: critterwatch.org

2007-06-12 Thread Udi
If I were you I'd get my hands on pictures of all of the "critters" and put them next to their names. It'd spice up the UI a bit. Udi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: get subversion revision-number in a django-project

2007-06-15 Thread Udi
Mind if I ask why? Udi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@googlegroups.com To unsubscribe from this group, send email

Re: get subversion revision-number in a django-project

2007-06-16 Thread Udi
build.xml: CSS_CHECKSUM I figured I'd throw this out there in case others are looking for alternate solutions. Peace, Udi On Jun 16, 4:52 am, Gábor Farkas <[EMAIL PROTECTED]> wrote: > Udi wrote: > > Mind if I ask why? > > i've got the idea from > here:

IOError: Client read error (Timeout?) - When doing an AJAX Post

2007-07-20 Thread Udi
: '102', 'HTTP_CONTENT_TYPE': 'application/x-www-form-urlencoded; charset=utf-8', ... 'HTTP_UA_CPU': 'x86', 'HTTP_USER_AGENT': 'Mozilla/4.0 (compatible; MSIE 7.0; Windows NT 5.1; .NET CLR 1.1.4322; InfoPath.1)', 'HTTP_X_

Re: Page generation times

2007-08-07 Thread Udi
I think this is what you're after: http://www.djangosnippets.org/snippets/358/ And for more serious profiling: http://www.djangosnippets.org/snippets/186/ On Aug 7, 1:10 pm, TheMaTrIx <[EMAIL PROTECTED]> wrote: > In PHP its handy and easy to setup a function to use during > development where y

Re: using chaining filter() and select_related()

2007-08-07 Thread Udi
Try doing the select_related() at the end Remove the first use of it and then after the loop add this: employees = employees.select_related() I think that'll work? On Aug 7, 10:25 pm, james_027 <[EMAIL PROTECTED]> wrote: > hi, > > I am doing something like this > > params = request.GET

Re: return html snippet via XHR with simplejson

2007-08-11 Thread Udi
If you just want to return html that will get dumped into a container via innerHTML, then I don't really see the need to return json. Just return the html as text/html and dump the response directly into the container. However, the approach you are taking is nice because it lets you add more met

500 error email to admins - user information is missing...

2007-08-31 Thread Udi
cated users are using my site. Am I looking in the wrong place? Is there any way to get this info into the email? Thanks! Udi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post

Re: Middleware for checking client info and many other queries

2008-01-09 Thread Udi
Re: #2 I wouldn't worry about it. http://aspn.activestate.com/ASPN/Mail/Message/python-list/998253 Re: #4 http://www.djangosnippets.org/snippets/358/ http://code.djangoproject.com/wiki/PageStatsMiddleware On Jan 8, 12:35 am, "Ravi Kumar" <[EMAIL PROTECTED]> wrote: > Hi, > This is my First p

Re: Need a replacement of pyLucene :(

2008-01-11 Thread Udi
I've had good luck with solr. It's basically an http rest interface to your Lucene index. So, this way you can avoid all the threading issues and whatnot that crop up with pylucene. It's java based, so I guess it'll run on windows. http://lucene.apache.org/solr/ http://wiki.apache.org/solr/

Re: How do _you_ handle versioning your CSS/JS files?

2008-01-17 Thread Udi
In my base template: In my ant build script: /* checksum is built into ant on most os's, so it's easier than using svn */ CSS_CHECKSUM On Jan 16, 6:11 pm, Andrew <[EMAIL PROTECTED]> wrote: > There are a bunch of articles about versioning your CSS/JS so you can > set an infinite exp

Re: How to return this kind of JSON?

2008-03-24 Thread Udi
onse(json, mimetype = 'application/javascript') JAVASCRIPT, in your xhr callback fn: var jsonObject = eval('(' + jsonString + ')'); var html = jsonObject.html; //now you can inject this into a container var listLength = jsonObject.tweet_count; //you can use the extra me

Re: Removetags template filter

2007-03-28 Thread Udi
use |striptags Udi On Mar 28, 3:31 am, Anderson Santos Silva <[EMAIL PROTECTED]> wrote: > Hello everyone, > >I have a field with a tinymce editor, so it saves html tags inside > the field and this text is send by e-mail with an html and an > alternative text version.

Re: media urls in templates

2007-04-10 Thread Udi
You can create a custom context processor that fetches the base media url from your settings file and makes it available to the templates. Check this out: http://www.b-list.org/weblog/2006/06/14/django-tips-template-context-processors On Apr 4, 11:02 am, "akonsu" <[EMAIL PROTECTED]> wrote: > he

Re: how to scale (was: how to do something at startup)

2007-10-03 Thread Udi
Check out: http://ant.apache.org/ These types of deployment & initialization tasks should be handled by the surrounding environment, not Django itself. I suggest you use ant or something similar to set up some scripts for yourself that coordinate everything. --~--~-~--~~--

New Django App... FeedEachOther

2007-10-08 Thread Udi
e over the past few months of development. We'd love to hear feedback from this crowd, no matter how harsh it might be. Django rules :) Thanks! Udi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Dja

Re: New Django App... FeedEachOther

2007-10-08 Thread Udi
Hi Justin, Glad to hear that the topic page is going to make it into your RSS reader, but I also want to make it clear that FeedEachOther itself is an RSS reader. And a very good one at that. Import your OPML and give it a try. Thanks for the feedback! Udi On Oct 8, 10:55 pm, "Justin

Re: Scaling architecture question: separate media server

2007-10-30 Thread Udi
right permissions, and not the "apache" user. I'm dealing with relatively small files compared to what you will be dealing with, so I don't know if this is the right solution for you. Udi http://feedeachother.com/ On Oct 29, 8:30 am, Jökull <[EMAIL PROTECTED]> wrote: > I am

Re: Caching, sidebar, oh my...

2007-10-30 Thread Udi
(cache_key, list(qs), settings.CACHE_TIME_COMMON_THING) return t Udi http://feedeachother.com On Oct 30, 6:24 am, Roodie <[EMAIL PROTECTED]> wrote: > Hello, > > I am working on a small portal, and there is a sidebar which is > visible on every page. It contains the list of la

Re: Automatically create a UserProfile object when a User is created

2007-12-14 Thread Udi
ofile.save() dispatcher.connect(create_profile_for_user, signal=signals.pre_save, sender=User) There's a closed ticket for adding a flag to let you know if the object was created or not, but I don't think this is included in the trunk yet. Does anyone know when it will be? http://code.djangoproject.com/t

Re: Automatically create a UserProfile object when a User is created

2007-12-14 Thread Udi
.save() dispatcher.connect(create_profile_for_user, signal=signals.post_save, sender=User) Sweet. On Dec 14, 3:32 am, Udi <[EMAIL PROTECTED]> wrote: > The only issue with this approach is that you're going to do an extra > db query every time an existing User object is modifi

Completely disable auto-escape

2007-12-14 Thread Udi
not be the case. Is there something that I can put in my settings.py file to turn it off entirely? Thanks! Udi --~--~-~--~~~---~--~~ You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, sen

Re: Automatically create a UserProfile object when a User is created

2007-12-14 Thread Udi
Yeah, sorry, whoops. The id hack is still useful in some other scenarios, but the problem you mentioned is exactly why they added this created flag. So, that's the best choice here. On Dec 14, 4:44 am, Alex Koshelev <[EMAIL PROTECTED]> wrote: > Hmm...But if user instance doesn't have an id, how

Re: Templates, filesystem, caching?

2007-12-17 Thread Udi
Manually call get_template() or select_template(), and stuff the >resulting Template object into a module-global variable somewhere. >Then just re-use it, calling render() with different contexts, each >time you need it. Along those lines, I recently noticed this bit of code that swaps the get_te