Hi group, I am having a problem getting text in the url to be passed as arguments to my view.
My defined urls are: <code> (r'^notes/', 'notes'), (r'^notes/(?P<action>a|e|d{1})/(?P<id>[0-9]*)/$', 'notes'), </code> My view is as follows: <code> @login_required() def notes(request, action=None, id=0): if action == 'a': n = Notes() n.note = request.POST["note"] n.user = request.user n.save() elif action == 'e': pass elif action == 'd': pass notes_list = Notes.objects.filter(user=request.user) return render_to_response("pim/notes.html", { "notes" : notes_list, "action" : action, "id" : id}) </code> When I navigate to domain/app/notes the template is displayed and I have the action and id being printed to the page as 'None', and '0'. When the page gets posted to domain/app/notes/a/0/ I get the same exact information back and if action == a is never executed. I have read through the docs over and over and it looks like I'm doing it correctly but I guess I'm not. Does anyone have an idea what I'm doing wrong? --~--~---------~--~----~------------~-------~--~----~ 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@googlegroups.com To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/django-users?hl=en -~----------~----~----~----~------~----~------~--~---