Many thanks for your help. I got it working after taking out some of
the shortcuts, and modifying my URLs.
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to
Besides, what Waylan asked you to test, can you also post here your
project's main urls.py?
--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups
"Django users" group.
To post to this group, send email to django-users@go
On 11/3/06, jefurii <[EMAIL PROTECTED]> wrote:
>
> Thanks for replying. The update method looks like this:
>
> def update(request, myobject_id):
> o = get_object_or_404(MyObject, pk=myobject_id)
> o.title = request.POST['name']
> ...
> o.save()
> return
Thanks for replying. The update method looks like this:
def update(request, myobject_id):
o = get_object_or_404(MyObject, pk=myobject_id)
o.title = request.POST['name']
...
o.save()
return HttpResponseRedirect('/myapp/%s/' % myobject.id)
The redirect
>
> urlpatterns = patterns('myproject.myapp.views',
> (r'^$', 'index'),
> (r'^(?P\d+)/$', 'detail'),
> (r'^(?P\d+)/edit/$', 'edit'),
> (r'^(?P\d+)/update/$', 'update'),
> )
What does the update method in your views look like?
--~--~-~--~~-
Hello everyone, I'm new to Django and am evaluating it for use on
redesigning a PHP-based site. I'm working on a proof-of-concept app,
and am hitting a very strange snag.
I'm trying to make an interface for users to edit objects, but the
object ID always ends up being appended to the URL.
The f
6 matches
Mail list logo