Re: View didn't return an HttpResponse object

2014-10-27 Thread Collin Anderson
Hello, The messages framework might be helpful here. from django.contrib import messages messages.add_message(request, messages.INFO, 'Password was changed') return logout_then_login(request, login_url='/login/') Logowanie na stronie Managera Piłkarskiego GoalKick {% for message in messages %

Re: View didn't return an HttpResponse object

2014-10-24 Thread Dariusz Mysior
I have in views.py message="Password was changed" return logout_then_login(request, login_url='/login/',extra_context={ 'message': message}) And I want display this message in login.html below {% extends "base_site_dom.html" %} {% block title %} - logowanie {% endblock %} {% block content %}

Re: View didn't return an HttpResponse object

2014-10-21 Thread Dariusz Mysior
Thank You, once again it help :) W dniu poniedziałek, 20 października 2014 23:55:28 UTC+2 użytkownik Collin Anderson napisał: > > Hello, > > from django.contrib.auth import logout,login,authenticate,password_change > I think you want: > from django.contrib.auth import logout,login,authenticate >

Re: View didn't return an HttpResponse object

2014-10-20 Thread Collin Anderson
Hello, from django.contrib.auth import logout,login,authenticate,password_change I think you want: from django.contrib.auth import logout,login,authenticate from django.contrib.auth.views import change_password Collin -- You received this message because you are subscribed to the Google Groups

Re: View didn't return an HttpResponse object

2014-10-20 Thread Dariusz Mysior
Now I try change this part of code in views.py #request.user.set_password(form.cleaned_data['password2']) #request.user.save() #return render(request, 'registration/change_password_success.html', {'user': request.user}) On from django.contrib.auth import logout,

Re: View didn't return an HttpResponse object

2014-10-07 Thread Dariusz Mysior
It work's! :) Thank You!! now I have: def password_change_dom(request): if request.method == 'POST': form = FormularzPasswordChange(request.POST) if form.is_valid(): request.user.set_password(form.cleaned_data['password2']) request

Re: View didn't return an HttpResponse object

2014-10-07 Thread Collin Anderson
are they already logged in? use request.user.set_password() and request.user.save() -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@goo

Re: View didn't return an HttpResponse object

2014-10-07 Thread Dariusz Mysior
It was like You said, now I see form and when I write password and submit I have KeyError at /password_change/ 'username' Request Method:POSTR

Re: View didn't return an HttpResponse object

2014-10-07 Thread Collin Anderson
also, I highly recommend the render() shortcut: def password_change_dom(request): if request.method == 'POST': form = FormularzPasswordChange(request.POST) if form.is_valid(): user = authenticate(username=form.cleaned_data['username']) user.set_password(

Re: View didn't return an HttpResponse object

2014-10-07 Thread Collin Anderson
unindent the last bit: > if request.method == 'POST': > form = FormularzPasswordChange(request.POST) > if form.is_valid(): > user = authenticate(username=form.cleaned_data['username' > ]) > #user = User.objects.get(username='username')

Re: View didn't return an HttpResponse object

2014-10-07 Thread Dariusz Mysior
It's : ef password_change_dom(request): if request.method == 'POST': form = FormularzPasswordChange(request.POST) if form.is_valid(): user = authenticate(username=form.cleaned_data['username']) #user = User.objects.get(username='username

Re: View didn't return an HttpResponse object

2014-10-07 Thread Collin Anderson
What does your password_change_dom view look like? -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this gro

View didn't return an HttpResponse object

2014-10-07 Thread Dariusz Mysior
I have form to change password like below, and when I try to display it I have an bug: ValueError at /password_change/ The view dom.views.password_change_dom didn't return an HttpResponse object.

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Satinderpal Singh
On Mon, Oct 1, 2012 at 4:58 PM, Babatunde Akinyanmi wrote: > Oooops. I see the question has already been answered. My phone didn't > get the update on time. No worries, Thanks anyways > On 10/1/12, Babatunde Akinyanmi wrote: >> Its possible that when you refresh the form and the POST request get

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Babatunde Akinyanmi
Oooops. I see the question has already been answered. My phone didn't get the update on time. On 10/1/12, Babatunde Akinyanmi wrote: > Its possible that when you refresh the form and the POST request gets > submitted, the form doesn't pass the form.is_valid() if conditional. > In your code, you d

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Babatunde Akinyanmi
Its possible that when you refresh the form and the POST request gets submitted, the form doesn't pass the form.is_valid() if conditional. In your code, you didn't make any provision for when the form fails the is_valid() test and from your code, execution stops once is_valid() returns False so I *

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Tom Evans
On Mon, Oct 1, 2012 at 12:11 PM, Satinderpal Singh wrote: > On Mon, Oct 1, 2012 at 4:27 PM, Tom Evans wrote: >> On Mon, Oct 1, 2012 at 11:36 AM, Satinderpal Singh >> wrote: > I add the following to my code, >>> I made a model form and a view which accepts input as a form and >>> display it in th

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Satinderpal Singh
On Mon, Oct 1, 2012 at 4:27 PM, Tom Evans wrote: > On Mon, Oct 1, 2012 at 11:36 AM, Satinderpal Singh > wrote: I add the following to my code, >> I made a model form and a view which accepts input as a form and >> display it in the html format. As when i refresh the html page or try >> to fill an

Re: The view didn't return an HttpResponse object.

2012-10-01 Thread Tom Evans
On Mon, Oct 1, 2012 at 11:36 AM, Satinderpal Singh wrote: > I made a model form and a view which accepts input as a form and > display it in the html format. As when i refresh the html page or try > to fill another entry in the form, it gives the following error: > > The view Automation.report.vie

The view didn't return an HttpResponse object.

2012-10-01 Thread Satinderpal Singh
I made a model form and a view which accepts input as a form and display it in the html format. As when i refresh the html page or try to fill another entry in the form, it gives the following error: The view Automation.report.views.chemical_analysis didn't return an HttpResponse object. Here is

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread rick girdhar
after entering number in the template page .am getting the error,that is: NoReverseMatch at /record_system/studentid/ Reverse for 'record_system.views.search' with arguments '(None,)' and keyword arguments '{}' not found. and this is my new updated view.. def search(request , rollno):

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hmmm i can find my solution after inserting this line rollno = request.POST.get('rollno') and this was the coding part of my application ,but can you please tell me that why my *" if form.is_valid():* " is not working..what's wrong in this?? On Fri, Jul 6, 2012 at 4:06 PM, manish girdhar wrote:

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hm finally got it.thanks for the quick reply friend..thanks alot. On Fri, Jul 6, 2012 at 4:00 PM, Jani Tiainen wrote: > 6.7.2012 13:18, manish girdhar kirjoitti: > > so sorry friend..am new to the django and am unable to catch your >> point...can you please describe this with examp

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
6.7.2012 13:18, manish girdhar kirjoitti: so sorry friend..am new to the django and am unable to catch your point...can you please describe this with example or with my code..thank you.. [Snip snip with binary scissors] Problem is that there is two problem points: Your view doesn't have "defa

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
so sorry friend..am new to the django and am unable to catch your point...can you please describe this with example or with my code..thank you.. On Fri, Jul 6, 2012 at 3:08 PM, Jani Tiainen wrote: > It doesn't ever work since you should rerender form with current data and > errors if form.valid(

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
It doesn't ever work since you should rerender form with current data and errors if form.valid() returns false. Currently your logic doesn't return _nothing_ if form.valid() is false def studentid(request): if request.method == 'POST': form = Student_loginForm(request.POST)

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
thanks for the concern firend but i already have an form.error in my template... *this is my template.. * student id {% if form.errors %} Please correct the error{{ form.errors|pluralize }} below. {% endif %} STUDENT RECORD SYSTEM

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Jani Tiainen
Print out form.errors it will contain dictionary about fields and errors in particular field. You get the error because your form didn't validate in the first place so either you have bad data, are missing required data or something else in validation fails. form.errors will reveal that. 6.7

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
thank you for your concern friend,but i have an another view .in that it perfectly worksbut here am getting problem and i know *"if form.is_valid():"* is getting falsewhat am looking for is this, that why here am getting problem. this thing perfectlly works in my adding two number view'

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread Karl Sutt
There is no HttpResponse object returned if the form is *not* valid. You might want to return a template saying that the form input was incorrect. Tervitades/Regards Karl Sutt On Fri, Jul 6, 2012 at 11:49 AM, manish girdhar wrote: > hii tom, > yeah i have rectidy rollno = cd["rollno"] ,but agai

Re: view didn't return an HttpResponse object....plz help

2012-07-06 Thread manish girdhar
hii tom, yeah i have rectidy rollno = cd["rollno"] ,but again am getting error didn't get an httpresponse object... this is my view. def studentid(request): if request.method == 'POST': form = Student_loginForm(request.POST) if form.is_valid(): cd = form.cleaned_da

Re: view didn't return an HttpResponse object....plz help

2012-07-05 Thread Tom Evans
On Thu, Jul 5, 2012 at 8:38 AM, manish girdhar wrote: > yes it was indentation error and i rectified that.thanks for the concern > friend.. > I would have thought that it was you refering to the undefined variable rollno here: cd = form.cleaned_data rollno = cd[rollno]

Re: view didn't return an HttpResponse object....plz help

2012-07-05 Thread manish girdhar
yes it was indentation error and i rectified that.thanks for the concern friend.. On Thu, Jul 5, 2012 at 12:40 PM, kenneth gonsalves wrote: > On Thu, 2012-07-05 at 12:29 +0530, manish girdhar wrote: > > thanks for the help friend..after manipulate that thing i got an error > > of* > > *UnboundLoc

Re: view didn't return an HttpResponse object....plz help

2012-07-05 Thread kenneth gonsalves
On Thu, 2012-07-05 at 12:29 +0530, manish girdhar wrote: > thanks for the help friend..after manipulate that thing i got an error > of* > *UnboundLocalError at /record_system/studentid/ > > local variable 'rollno' referenced before assignment error in indentation - it is difficult to check this

Re: view didn't return an HttpResponse object....plz help

2012-07-05 Thread manish girdhar
on would complete execution and exit >> out since inner if condition is False and wont enter inner if condition. >> >> I think you should move out the return statement from the else loop. >> >> >> On Thursday, July 5, 2012 10:43:29 AM UTC+5:30, rick wrote: >>&g

Re: view didn't return an HttpResponse object....plz help

2012-07-04 Thread manish girdhar
t the return statement from the else loop. > > > On Thursday, July 5, 2012 10:43:29 AM UTC+5:30, rick wrote: >> >> >> i want to filter roll no from database,but when i enter the number >> ,browser gives *view didn't return an HttpResponse object* this

Re: view didn't return an HttpResponse object....plz help

2012-07-04 Thread dizzydoc
think you should move out the return statement from the else loop. On Thursday, July 5, 2012 10:43:29 AM UTC+5:30, rick wrote: > > > i want to filter roll no from database,but when i enter the number > ,browser gives *view didn't return an HttpResponse object* this is my

view didn't return an HttpResponse object....plz help

2012-07-04 Thread rick
i want to filter roll no from database,but when i enter the number ,browser gives *view didn't return an HttpResponse object* this is my view.. def studentid(request): if request.method == 'POST': form = Student_loginForm(request.POST) if form.is_valid():

Re: The view didn't return an HttpResponse object.

2008-12-16 Thread Malcolm Tredinnick
> print"nothing" > return render_to_response('inventory/orderprocess.html', > {'form':form}) > > above is my view code when a try to call this view its give and error > "The view didn't return an HttpResponse object." >

Re: The view didn't return an HttpResponse object.

2008-12-16 Thread Eric Abrahamsen
t; > above is my view code when a try to call this view its give and error > "The view didn't return an HttpResponse object." > > i have similar type of view which works fine whats the problem with > this .. > > --~--~-~--~~~---~--~

The view didn't return an HttpResponse object.

2008-12-16 Thread oops
ry/orderprocess.html', {'form':form}) above is my view code when a try to call this view its give and error "The view didn't return an HttpResponse object." i have similar type of view which works fine whats the problem with this .. --~--~-~--~~--

Re: View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
Ok thank you! I've taken care of the superfluous code and thought it was something silly I was missing. Thanks! On Sep 25, 11:25 am, Tim Chase <[EMAIL PROTECTED]> wrote: > > if not request.GET.get('avatarkey',''): > > raise Http404 > > elif len(request.GET['avatarkey']

Re: View didn't return an HttpResponse object?

2007-09-25 Thread Tim Chase
> if not request.GET.get('avatarkey',''): > raise Http404 > elif len(request.GET['avatarkey']) != 36: > raise Http404 Just as a side-note, these two are a bit redundant. I'd suggest either if 'avatarkey' not in request.GET or len(request.GET['avatarkey'

Re: View didn't return an HttpResponse object?

2007-09-25 Thread Chris Hoeppner
return render_to_response (...) El mar, 25-09-2007 a las 10:14 +, Ryan K escribi�: > > from django.http import HttpResponse, Http404 > from django.template import RequestContext > from django.shortcuts import render_to_response > > def verify_sl(request): > if request.method == 'GET': >

View didn't return an HttpResponse object?

2007-09-25 Thread Ryan K
from django.http import HttpResponse, Http404 from django.template import RequestContext from django.shortcuts import render_to_response def verify_sl(request): if request.method == 'GET': if not request.GET.get('avatarkey',''): raise Http404 elif len(request.GET[