Tuesday, March 31, 2015

Re: encode url

you want to encode them before they are submitted to the server? why?

On Tue, Mar 31, 2015 at 1:23 PM, Pnelson <pnelson.tome@gmail.com> wrote:

Im trying to learn django and i have a form in html that have 3 arguments (app_id,user_id and username) and i want to encode those 3 arguments in base64.

views.py

def encode(self):          return base64.b64encode()    def decode(self):          return base64.b64decode()

login.html

<body>  <form action="/notification_html/" method="get">      Application ID: <input type="text" name="appid">      User ID: <input type="text" name="userid">      Username: <input type="text" name="username">      <input type="submit" value="Login">      <input type="reset" value="Reset">  </form>  </body>

URL created: http://127.0.0.1:8000/notification_html/?appid=1&userid=&username=1

Any suggestion to encode the url?

Thanks for help


--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/5651af5b-9878-4c52-92a0-6ac32e1610dd%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at http://groups.google.com/group/django-users.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CALn3ei2mnCBx0qJjsXRJbJdR9Qcy_UMVrR2p7qKMxCzHyJff-Q%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment