Created
August 27, 2012 03:07
-
-
Save daikeren/3485223 to your computer and use it in GitHub Desktop.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| from django.shortcuts import render | |
| from django.http import HttpResponse | |
| from forms import POIForm | |
| def poiadd(request): | |
| form = POIForm(initial={'name': 'test'}) | |
| if request.method == 'POST': | |
| form = POIForm(request.POST) | |
| form.name = "test" | |
| if form.is_valid(): | |
| return HttpResponse('OK') | |
| else: | |
| return render(request, 'test.html', {'poi_form': form }) | |
| return render(request, 'test.html', {'poi_form': form }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment