Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-28 Thread Kieran Farr
Thanks, David -- you're right on, now I just return an HttpResponse with result code 404. Benedict, could you post the view for /management/statistics/top/user/ yearly/ that is causing the 403? Kieran On Jul 28, 6:47 am, steven314 wrote: > @etone: has this discussion of CSRF enable

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-27 Thread Kieran Farr
better way to provide debugging information for 403 errors raised from the built-in CSRF methods? All the best and thanks for a great framework. Kieran On Jul 27, 6:54 pm, Kieran Farr wrote: > Further research shows that CSRF is enabled regardless of my > settings.py if we use Dja

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-27 Thread Kieran Farr
ngos-csrf-middleware The decorator @csrf_exempt does not work as described in the docs as our view always returns a 403 when any content is POSTed. Very confusing! Kieran On Jul 27, 1:32 pm, Kieran Farr wrote: > Raj sorry I misread your question. This initial response is in re: my > listener

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-27 Thread Kieran Farr
ed [text/plain] Saving to: `index.html.1' [ <=> ] 27 --.-K/s in 0s 2010-07-27 20:31:14 (1.84 MB/s) - `index.html.1' saved [27] On Jul 27, 11:34 am, Kieran Farr wrote: > This is intended not to be protected by auth, so this page is publicly > accessib

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-27 Thread Kieran Farr
return HttpResponse("Oops, something went wrong.", mimetype="text/plain", status=200) On Jul 27, 11:30 am, raj wrote: > Most probably it has something to do with permissions. Go thru the > exact code block which tries to post the data. Is the login successful &g

Re: HTTP POST sent from app to Django Server returns 403 Forbidden

2010-07-27 Thread Kieran Farr
gging 403s is nearly impossible. It'd be very helpful when in DEBUG mode to reveal who/what/why raised the 403. Any ideas? Kieran On Jul 26, 8:30 am, etone wrote: > Hi there, > > I'm trying to sent a HTTP POST from a client application to my Django > app.  Django

Re: Error in form validation with choices

2010-06-06 Thread Kieran Farr
I just ran into this as well. Very odd that earlier versions didn't raise the same error. On May 18, 1:38 pm, Jori wrote: > Thanks, you're correct. I don't know how I didn't notice but then > again it worked just fine with 1.1.1. > > -Jori > > On May 18, 11:03 pm, Daniel Roseman wrote: > > > >

Re: Django serving multiple subdomain sites -- okay to use thread-locals?

2010-06-01 Thread Kieran Farr
been seriously compromised, at which point there'd be easier attacks to execute. Kieran On May 31, 9:17 pm, Graham Dumpleton wrote: > On Jun 1, 1:04 pm, Kieran Farr wrote: > > > > > > > We're adapting our Django powered video site to be an open video > >

Django serving multiple subdomain sites -- okay to use thread-locals?

2010-05-31 Thread Kieran Farr
okBookThreadlocalsAndUser I don't see any other option besides using thread-locals to dynamically update SITE_ID per request. What would be another way of accomplishing this goal without thread- locals if indeed this is not best practice? Thanks in advance for your input. Kieran -- You rec

Re: Querysets returns wrong result when using threading.

2010-01-17 Thread Kieran Brownlees
Fantastic, thank you :) On Jan 16, 9:02 pm, Tomasz Zieliński wrote: > On 16 Sty, 06:15, Kieran Brownlees wrote: > > > Firstly thank you, secondly, how to get around it? I assume I need to > > force a commit for the transaction my thread is using, but querysets > >

Re: Querysets returns wrong result when using threading.

2010-01-15 Thread Kieran Brownlees
t wrote: > > > On Thu, Jan 14, 2010 at 10:26 PM, Kieran Brownlees > > wrote: > > > Basic example of format: > > > Main Thread: print objects.all() > > > Spawned Thread: print objects.all() -- same as main thread > > > Main Thread: objects.create(newObj)

Querysets returns wrong result when using threading.

2010-01-14 Thread Kieran Brownlees
: [] Thank you, Kieran -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more opti

Re: super() argument 1 must be type, not None

2009-12-21 Thread Kieran Brownlees
Have you restarted your server lately? I find that bug turns up from time to time when the auto reloader doesn't reload properly. Kieran On Dec 22, 12:17 pm, TiNo wrote: > Hi, > > I am overriding a save function of a model with the following code: > >     def save(s

Re: Best way to handle class attribute as a space separated string?

2009-12-21 Thread Kieran Brownlees
er with two lines: e, a, p = self.attrs.get('class'), self.attrs, self.pastClass a['class'] = ' '.join([x for x in e and e.split(' ') or []] + [p]) Could fit the final version in with three tabs and it's only 79 chars! Kieran On Dec 22, 10:32 am, Margie R

Re: Root url returning 302 FOUND

2009-12-20 Thread Kieran Brownlees
I probably should of tried it first. Your url setup works fine for me. Kieran On Dec 21, 5:10 pm, Kieran Brownlees wrote: > My guess would be the root url never ends without a '/' - ie to match > the root url you need a '/' somewhere. > > Try making the home_vie

Re: Root url returning 302 FOUND

2009-12-20 Thread Kieran Brownlees
My guess would be the root url never ends without a '/' - ie to match the root url you need a '/' somewhere. Try making the home_view regex r'^/$' Kieran On Dec 21, 5:05 pm, Kegan Gan wrote: > Anyone can shed some light to the matter? > > * Bring this po

"OneToOneField doesn't allow assignment of None"

2009-12-20 Thread Kieran Brownlees
class. 209 if value is None and self.related.field.null == False: Thank you, Kieran -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from t

Re: Shared connection stuff?

2009-05-28 Thread Kieran
, mjk, that a 'reset_connection' function or the like would be nice to have in Django. Barring that, is this a viable solution? It's worked for me so far, but feedback would be welcome. Best, Kieran On May 23, 3:46 pm, "m...@nysv.org" wrote: > On May 23, 11:57 am, "m

Re: Shared connection stuff?

2009-05-28 Thread Kieran
ction would be lovely, just to cut down on code redundancy. You said earlier that you had traced the home of the connection to the base model. I'm not sure what you mean by that -- could you explain the comment? Best, Kieran On May 23, 3:46 pm, "m...@nysv.org" wrote: > On May 2

Re: Advice on developing with django for a team of 10+

2006-03-23 Thread Kieran Holland
r one solution Kieran --~--~-~--~~~---~--~~ 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 to [E

Re: Arguing for convention over configuration

2005-09-04 Thread Kieran Holland
s you a nice little javascript-based interface for applying categories to your entries. Might do what you want, Kieran