Re: How to handle view/url situation (Newbie)

2009-05-04 Thread Masklinn
On 4 mai 09, at 23:36, Malcolm Tredinnick wrote: > On Mon, 2009-05-04 at 15:41 +0200, Masklinn wrote: >> On 4 May 2009, at 14:55 , pbzRPA wrote: >>> On May 4, 1:24 pm, Masklinn wrote: > > [...] > FWIW the `'app.views.showItems'` isn't even necessary, you can just pass the view functi

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread Masklinn
On 4 mai 09, at 23:36, Malcolm Tredinnick wrote: > On Mon, 2009-05-04 at 15:41 +0200, Masklinn wrote: >> On 4 May 2009, at 14:55 , pbzRPA wrote: >>> On May 4, 1:24 pm, Masklinn wrote: > > [...] > FWIW the `'app.views.showItems'` isn't even necessary, you can just pass the view functi

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread Malcolm Tredinnick
On Mon, 2009-05-04 at 15:41 +0200, Masklinn wrote: > On 4 May 2009, at 14:55 , pbzRPA wrote: > > On May 4, 1:24 pm, Masklinn wrote: [...] > >> FWIW the `'app.views.showItems'` isn't even necessary, you can just > >> pass the view function and reverse will figure out the rest, so > >> > >>

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread scott212
I'm not saying that the original OP code didn't work, just that it felt sloppy to have this lists/delete/item1 url lingering out there. Just looking for a better way. :) John Crawford-14 wrote: > > > Okay, I'm not sure why the OP code didn't work - it seems like going > to the URL 'lists/show

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread John Crawford
Okay, I'm not sure why the OP code didn't work - it seems like going to the URL 'lists/show', with the updated list, would work. So my *guess* is that since it's a page the browser already saw and cached, that the page just isn't getting refreshed. In other words, if he hit the browser-refresh but

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread scott212
You guys are awesome, it's always great to find a great new framework and then find out it has a great community as well. I can't wait to try this tonight. Thanks again! Masklinn wrote: > > > On 4 May 2009, at 14:55 , pbzRPA wrote: >> On May 4, 1:24 pm, Masklinn wrote: >>> On 4 May 2009, at

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread Masklinn
On 4 May 2009, at 14:55 , pbzRPA wrote: > On May 4, 1:24 pm, Masklinn wrote: >> On 4 May 2009, at 12:47 , pbzRPA wrote: >> >>> I would do the following. >> >>> from django.http import HttpResponseRedirect >>> from django.core.urlresolvers import reverse >> >>> def deleteItems(request, item): >> >

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread pbzRPA
On May 4, 1:24 pm, Masklinn wrote: > On 4 May 2009, at 12:47 , pbzRPA wrote: > > > I would do the following. > > > from django.http import HttpResponseRedirect > > from django.core.urlresolvers import reverse > > > def deleteItems(request, item): > > >    return HttpResponseRedirect(reverse('ap

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread Masklinn
On 4 May 2009, at 12:47 , pbzRPA wrote: > I would do the following. > > from django.http import HttpResponseRedirect > from django.core.urlresolvers import reverse > > def deleteItems(request, item): > >return HttpResponseRedirect(reverse('app.views.showItems')) FWIW the `'app.views.showItems

Re: How to handle view/url situation (Newbie)

2009-05-04 Thread pbzRPA
I would do the following. from django.http import HttpResponseRedirect from django.core.urlresolvers import reverse def deleteItems(request, item): return HttpResponseRedirect(reverse('app.views.showItems')) --~--~-~--~~~---~--~~ You received this message bec

Re: How to handle view/url situation (Newbie)

2009-05-03 Thread Masklinn
On 4 mai 09, at 06:54, scott212 wrote: > I'm reading through the djangobook and trying to build a small app as > I go. The app is just a list that I can add to and delete entries > from. Deleting is easy, but I'm not sure how the url/view portion > should be handled. > > http://127.0.0.1:8080/lis

Re: How to handle view/url situation (Newbie)

2009-05-03 Thread George Song
On 5/3/2009 9:54 PM, scott212 wrote: > I'm reading through the djangobook and trying to build a small app as > I go. The app is just a list that I can add to and delete entries > from. Deleting is easy, but I'm not sure how the url/view portion > should be handled. > > http://127.0.0.1:8080/lists

How to handle view/url situation (Newbie)

2009-05-03 Thread scott212
I'm reading through the djangobook and trying to build a small app as I go. The app is just a list that I can add to and delete entries from. Deleting is easy, but I'm not sure how the url/view portion should be handled. http://127.0.0.1:8080/lists/show/ list item 1 - [delete] list item 2 - [del