Re: Solving the POST-data-lost-after-redirect problem

2006-06-06 Thread Simon Willison
On 7 Jun 2006, at 04:11, Adrian Holovaty wrote: > * THROW ERROR ON FORM DISPLAY: If the APPEND_SLASH setting is set to > True and the CommonMiddleware is activated, Django could check the > output of every page for a whose method is POST and has an > "action" whose URL doesn't end in a slash. T

www.liveinforum.com

2006-06-06 Thread hotty_sarah
Hello Friend You are invited to join www.liveinforum.com There you can discuss / post on various topics like Fun, Jokes, Interesting True Facts, Movies, Music, Writing Skills, English Writing, Personal stories like Love, Romance, Breakup, Image & Photo Sharing, Video Clips, Entertainment, Chi

Re: Solving the POST-data-lost-after-redirect problem

2006-06-06 Thread Jeremy Dunck
On 6/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > * THROW ERROR ON POST: The CommonMiddleware, when adding a slash and > redirecting, can check for POST data. If it finds any, it somehow logs > the error or otherwise alerts the developer. Maybe if DEBUG=True it > can actually display an erro

Re: Solving the POST-data-lost-after-redirect problem

2006-06-06 Thread Malcolm Tredinnick
On Tue, 2006-06-06 at 22:11 -0500, Adrian Holovaty wrote: > http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata > > It's about time to solve this one. Who has a creative, elegant solution? :-) > > Some ideas, just to start discussion -- > > * THROW ERROR ON POST: The Comm

Solving the POST-data-lost-after-redirect problem

2006-06-06 Thread Adrian Holovaty
http://code.djangoproject.com/wiki/NewbieMistakes#POSTtoviewslosesPOSTdata It's about time to solve this one. Who has a creative, elegant solution? :-) Some ideas, just to start discussion -- * THROW ERROR ON POST: The CommonMiddleware, when adding a slash and redirecting, can check for POST da

Re: proposal for a new ValidationError

2006-06-06 Thread Gary Wilson
Bill de hÓra wrote: > Gary Wilson wrote: > > What do you think about adding a ValidationError similar to > > CriticalValidationError but one that would stop further evaluation of > > _all_ validators in the manipulator instead of just the remaining > > validators for the current form field being p

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Jeroen Ruigrok van der Werven
On 6/6/06, Adrian Holovaty <[EMAIL PROTECTED]> wrote: > So I'm proposing a Manager.get_or_create() method, which I believe was > Jacob's idea a few months ago. +1 from my side, with Simon's note in mind. -- Jeroen Ruigrok van der Werven --~--~-~--~~~---~--~~ Yo

Re: Issues on making the firebird backend working

2006-06-06 Thread Adrian Holovaty
On 6/6/06, David Elias <[EMAIL PROTECTED]> wrote: > Adrian, assuming that you are working on database support, are any > plans that each backend may add sql statements to the sqlall output in > the future? I've got nothing against adding a backend-specific hook for altering the "sqlall" output. W

Re: Issues on making the firebird backend working

2006-06-06 Thread David Elias
Already added the patch, for the ones that didn't know - http://code.djangoproject.com/ticket/1261 I'm trying to remove the "if settings.DATABASE_ENGINE == 'firebird'" from management.py and add some signals to use with the dispatcher. Already got this working inside the function "get_sql_create(

Re: django irc logger currently down

2006-06-06 Thread Kenneth Gonsalves
great to see you back Georg On 06-Jun-06, at 8:35 PM, hugo wrote: > > Hi, > > the #django IRC logger is currently down - my provider blocks port 667 > now, without giving me a notice about it. That's why I didn't notice a > problem until today. :-/ > > I try to find a solution - either get the pr

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Simon Willison
On 6 Jun 2006, at 06:39, Adrian Holovaty wrote: > * Currently this assumes the model has no field named "defaults". This > is a bit of a smell. Better solutions? It could take two dictionaries instead of using keyword arguments: obj = Person.objects.get_or_create( {'first_name':

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Adrian Holovaty
On 6/6/06, Bill de hÓra <[EMAIL PROTECTED]> wrote: > I understand why you might need this, but at the HTTP level, when the > example for this goes into the docs, can it be wrapped inside a > request.POST? That will stop someone somewhere from using get_or_create > via a GET view. Sure, Bill -- go

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Bill de hÓra
Adrian Holovaty wrote: > Time and time again I have the following Django code: > > try: > obj = Person.objects.get(first_name='John', last_name='Lennon') > except Person.DoesNotExist: > obj = Person(first_name='John', last_name='Lennon', > birthday=date(1940, 10, 9)) >

Re: django irc logger currently down

2006-06-06 Thread hugo
Hi, > I try to find a solution - either get the provider to open up the port > again (it's rather silly to not allow root servers to use port 6667 ... > especially the client-side of it ...) or by moving the logger to a ok, luckily the IRC servers are reachable on different ports, so I could jus

django irc logger currently down

2006-06-06 Thread hugo
Hi, the #django IRC logger is currently down - my provider blocks port 667 now, without giving me a notice about it. That's why I didn't notice a problem until today. :-/ I try to find a solution - either get the provider to open up the port again (it's rather silly to not allow root servers to

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Honza Král
+1 as well, I like the idea with the returning of the boolean - wouldn't it be possible to create a simple fla/function on a model that would tell you that so that the function will only have one return parameter? something like obj = Person.objects.get_or_create(first_name='John', last_name='Len

Re: PROPOSAL: Manager.get_or_create()

2006-06-06 Thread Ivan Sagalaev
Adrian Holovaty wrote: >Time and time again I have the following Django code: > >try: >obj = Person.objects.get(first_name='John', last_name='Lennon') >except Person.DoesNotExist: >obj = Person(first_name='John', last_name='Lennon', >birthday=date(1940, 10, 9)) >ob

Re: insert_or_replace()

2006-06-06 Thread Ian Holsman
On 06/06/2006, at 4:02 PM, Adrian Holovaty wrote: > > On 6/6/06, Ian Holsman <[EMAIL PROTECTED]> wrote: >> any chance of getting a insert_or_replace function as well? >> >> to do something similar to mysql 5's >> >> INSERT INTO table (a,b,c) VALUES (1,2,3) >> ON DUPLICATE KEY UPDATE c=c+1; >>