simple db and django

2 minute read I’m working on Project3 from my cs 462 class, where basically we need to make an ‘appserver’ which returns json stuff.Rather than making my machine listen on port 8010 for the appserver and seperately on 80 for the regular webserver, I just got apache to listen on port 8010, and reused all my code from […]

Read More simple db and django

forwarding a post in python

1 minute read Wanted to run some data validation on a post request, then forward that request onto a different url. Used urllib2, although it wasn’t exactly intuitive. In my python code, I receive an django.http Request object. To forward the request on, I did: |newReq=urllib2.Request(‘urlToFrwardTo’,urllib.urlencode(req.POST)) and then |urllib2.urlopen(newReq) The part that weirded me out was the why […]

Read More forwarding a post in python