Re: Template tag: how to output success message above input field

2011-08-14 Thread doniyor
oh thats right, thanks man On 14 Aug., 12:18, Andrew wrote: > I use the messages framework (https://docs.djangoproject.com/en/dev/ > ref/contrib/messages/#module-django.contrib.messages) to display > messages after handling a post. My base template displays the messages > meaning I can redirect t

Re: Template tag: how to output success message above input field

2011-08-14 Thread doniyor
thank you much, but let me ask you again in detail. i have this html:     Cache leeren: Cache clear and this view: def clear_it(request): b = Command() b.clear_cache() # # here i dont know what to write... # # success_msg = 'Cache cleared successfull' ret

Re: Template tag: how to output success message above input field

2011-08-14 Thread Andrew
I use the messages framework (https://docs.djangoproject.com/en/dev/ ref/contrib/messages/#module-django.contrib.messages) to display messages after handling a post. My base template displays the messages meaning I can redirect to any page after the post and know that the message will be displayed.

Re: Template tag: how to output success message above input field

2011-08-14 Thread Phang Mulianto
you can use javascript function... On Sun, Aug 14, 2011 at 4:53 PM, Subhranath Chunder wrote: > Setting a simple context variable in your view would solve your purpose. > > Thanks, > Subhranath Chunder. > www.subhranath.com > > > On Sun, Aug 14, 2011 at 1:22 PM, doniyor wrote: > >> Hey Guys, >> >

Re: Template tag: how to output success message above input field

2011-08-14 Thread Subhranath Chunder
Setting a simple context variable in your view would solve your purpose. Thanks, Subhranath Chunder. www.subhranath.com On Sun, Aug 14, 2011 at 1:22 PM, doniyor wrote: > Hey Guys, > > i need a litle help in working with forms. i have a button and i want > to output a success text above the but

Template tag: how to output success message above input field

2011-08-14 Thread doniyor
Hey Guys, i need a litle help in working with forms. i have a button and i want to output a success text above the button if the user presses the button. how to do this ? is there any template tag like {% if form.is_submitted %} or so? main point is that i dont want to write another html file on