I believe that the best practice is to always use the {% url %} template tag
and not hardcoding your URL's

2011/9/20 Fabio Natali <fa...@fnstudio.it>

> On 09/20/2011 07:15 PM, dm03514 wrote:
>
>> Fabio in your dev server output is it saying the type of request is
>> get?
>> ARe you accessing "/method/" through your form or are you just
>> directing your webserver to 
>> http://192.168.0.2:8000/**method/?<http://192.168.0.2:8000/method/?>
>> ??
>>
>
> Hi dm03514 and thanks for your help!
>
> Thanks to your suggestion I managed to resolve my issue. I looked at my
> development server logs and noticed 2 lines:
>
> [20/Sep/2011 12:17:27] "POST /method HTTP/1.1" 301 0
> [20/Sep/2011 12:17:27] "GET /method/ HTTP/1.1" 200 3
>
> I guess the lack of a trailing slash in my url was causing some sort of
> internal redirection. That redirection eventually caused the loss of POST
> stuff.
>
> I was using this:
>
> <form method="post" 
> action="http://192.168.0.2:**8000/method<http://192.168.0.2:8000/method>
> ">
> I changed that to:
>
> <form method="post" 
> action="http://192.168.0.2:**8000/method/<http://192.168.0.2:8000/method/>
> ">
> and everything was fixed.
>
> Don't you think this is too fragile and error prone? I guess I may forget
> the trailing slash again in the future and that will mean the break of
> everything... Is there any best practice for this?
>
> Thanks! Greetings, Fabio.
>
>
> --
> Fabio Natali FNstudio
>
> --
> 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+unsubscribe@**
> googlegroups.com <django-users%2bunsubscr...@googlegroups.com>.
> For more options, visit this group at http://groups.google.com/**
> group/django-users?hl=en<http://groups.google.com/group/django-users?hl=en>
> .
>
>


-- 
Andrés Reyes Monge
armo...@gmail.com
+(505)-8873-7217

-- 
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.

Reply via email to