Tried HttpResponseRedirect('/') and still nothing happens. Thanks
On Monday, March 5, 2012 5:52:50 PM UTC+2, ke1g wrote:
>
> If that's your complete view, you've forgotten to return an HTTPResponse
> object.
>
> Since action='.', it appears that you are using the same view to get
> the form and
dHey tom... The homepage displays a list of entries posted by users... Each
entry has a submit button next to it, I watched many tutorials and i still
dont get how those requests work...
I made the view as above and the main idea is to add +1 to my "pushes"(my
model has a pushes field wich is
If that's your complete view, you've forgotten to return an HTTPResponse object.
Since action='.', it appears that you are using the same view to get
the form and to
post (which is fine), but each case must return a response for the
prowser, presumably
rendered from the same template. The
On Mon, Mar 5, 2012 at 3:24 PM, leaks wrote:
> no, no errors get displayed... Just nothing happens.
Absolutely and literally 'nothing happens'? Really?
Does the browser submit the form, django receive a request and render
a response? I would definitely class that as
no, no errors get displayed... Just nothing happens. Do you mean passing
the pk in my url?
On Monday, March 5, 2012 5:13:14 PM UTC+2, eng.Ilian Iliev wrote:
>
> Hi,
>
> first of all use if request.POST, second pehaps you should pass the pk as
> part of the action URL.
> Do you get any errors or
Hi,
first of all use if request.POST, second pehaps you should pass the pk as
part of the action URL.
Do you get any errors or anything?
--
eng. Ilian Iliev
Web Software Developer
Mobile: +359 88 66 08 400
Website: http://ilian.i-n-i.org
On Mon, Mar 5, 2012 at 4:54 PM, leaks
I don't get an error... Nothing just happens
my view: (I think the problem is here)
def push(request, pk):
if request.method == 'POST':
entry = Entry.objects.get(pk=pk)
entry.pushes +=1
entry.save()
My template:
{% for entry in entries.object_list %}
{{ entry.title
7 matches
Mail list logo