Re: Problem with Development Server?

2006-10-27 Thread samuraisam
> I suspect this is because the development server is single threaded. > That means one request at a time. So if another thread is tying up the > request processing, your first thread is out of luck. > > Regards, > Malcolm The other thread waits several seconds before trying the pingback, and I w

Problem with Development Server?

2006-10-27 Thread samuraisam
I have a pingback function in the app that I'm writing which I start in a new thread. Something like this: def send_pingbacks(source_uri, body): thread.start_new_thread(_send_pingbacks_threaded, (settings.ROOT_URI, source_uri, body)) Which works. But if I'm pingin

Re: HttpResponseRedirect and Request Header

2006-10-27 Thread samuraisam
On Oct 27, 3:18 pm, "Mike" <[EMAIL PROTECTED]> wrote: > HttpResponseRedirect fully preserves the page header sent to it and > forwards it to whatever URL it is being sent to. For instance, if a > user is going from Google to site A, where he is immidiatly > 'HttpResponseRedirect'ed to site B, site

Deleting all objects (undesired behavior)

2006-10-22 Thread samuraisam
I have a model [http://paste.e-scribe.com/2236/] which, after I populate with a few items (with different content types, object id's, different everything...), I'll call .delete() on an instance of *one* of them and it deletes *all* of them. It only fires one signal, and thus, the file field's del

Security of Django Templates?

2006-10-17 Thread samuraisam
I'm currently implementing a system which will allow users to make custom templates based on the Django templating engine. Before I deploy or even develop any further, though, I guess I should find out--how secure are Django templates are. Do they allow any access to the system? Is there something

Testing for Membership Across Relations

2006-10-12 Thread samuraisam
Alright, so this is my third day with Django, and I am kind of stuck. I'm trying to test for membership objects across relations in a lookup. Hopefully that makes sense. O.o I'm using the basic User model. I have a Friend model which makes two ForeignKeys to User: class Friend(models.Model):

Re: Filter QuerySet using Manager

2006-10-12 Thread samuraisam
Thanks, Malcom. I think I figured out what I need to do: if request.user.is_anonymous(): return posts which are marked "public" (easy) if request.user.is_logged_in(or whatever the method is): return posts which are marked "protected" (easy) also return posts which are marked "restricted" (

Re: Filter QuerySet using Manager

2006-10-12 Thread samuraisam
Another question: how can I check if a related field contains something? Thanks, Sam --~--~-~--~~~---~--~~ 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@googlegro

Re: Filter QuerySet using Manager

2006-10-11 Thread samuraisam
Here, hopefully this can explain it better (a little more specific, but maybe that'll help): select all entries where: if the user is the owner or a writer of the blog, the private posts if the user is registered, the protected posts if the user is a member of the owne

Re: Filter QuerySet using Manager

2006-10-11 Thread samuraisam
The biggest reason I want to filter it here, in the Model level, is so I can still slice and chain filters, like normal QuerySets, and the permissions will be transparently taken care of. Thanks again, Sam --~--~-~--~~~---~--~~ You received this message because y

Filter QuerySet using Manager

2006-10-11 Thread samuraisam
Hi guys and gals, this is my first post to django-users. My problem: I need to filter a QuerySet, possibly using a Manager but I'm lost at how to do it. For example: class Special(models.Model): PERMS = (('by user', 'restrict to only allowed users'), ('anyone', 'no restrictions)) [.. mod