Thanks for that insight. It's always good to reinforce best practices for
newcomers like myself.
On Monday, May 21, 2012 7:47:33 AM UTC-4, bruno desthuilliers wrote:
>
> On May 19, 5:41 pm, Jonathan Baker
> wrote:
>
> Just a note about best practises:
>
> >
> > # views.py
>
> (snip)
>
> >
On May 19, 5:41 pm, Jonathan Baker
wrote:
Just a note about best practises:
>
> # views.py
(snip)
> return HttpResponseRedirect("/report/all/")
Better to use named urls and django.core.urlresolvers.reverse, this
avoids quite a lot of pain and trouble when you have to change your
u
Perfect! That worked!
Thank you so much! I was stumped. Your revisions were much simpler and easy
to understand as well. I really appreciate when I can learn something,
especially a more straightforward process that is less complex and achieves
the same desired results.
Thank you, again!
On S
Thanks. I get this error using that code:
TypeError at /report/detail/30/edit/
__init__() takes at least 2 arguments (1 given)
This is referring to this line:
story_form = StoryForm(instance=story)
I added a "story_id" argument to this, which brought up the form, but when
I submitted it
Thanks. This worked:
else:
story_form = StoryForm(request.user, instance=story_form)
One problem: it just adds a new version of the story instead of updating
the previous version. So "editing" just creates multiple versions instead
of actually editing the existing story.
Is there a wa
The lines:
#else:
#story_form = StoryForm(instance=story_form)
...appear to be handling the GET request, and they're commented out.
On Fri, May 18, 2012 at 3:22 PM, DF wrote:
> Newbie question. I have an application where registered users can submit
> stories. The posting and display
6 matches
Mail list logo