This ties into mt question from earlier. I've looked a few answers to similar issues, but I'm not sure how they apply here.
I'm trying to use GET methods to creat content on a Django Webserver. When i type the following url:
http://127.0.0.1:8000/maps/createEvent/?name=explosion&reporter=nathaniel&description=something%20exploded&lat=99&lon=99×tamp=2434253
I get this error:
invalid literal for int() with base 10: 'explosion'
Request Method: GET
Request URL: http://127.0.0.1:8000/maps/createEvent/?name=explosion&reporter=nathaniel&description=something%20exploded&lat=99&lon=99×tamp=2434253
Django Version: 1.5.2
Exception Type: ValueError
Exception Value:
invalid literal for int() with base 10: 'explosion'
Here's the url in question:
url(r'^createEvent/$', views.createEvent, name='createEvent')
And the View:
def createEvent(request):
e = Event(request.GET['name'],request.GET['reporter'],request.GET['description'],
request.GET['lat'],request.GET['lon'],request.GET['timestamp'])
e.save()
return HttpResponseRedirect(reverse('maps:event_detail', args=(e.id,)))