Last active
December 23, 2015 18:49
-
-
Save jumbojet/6678291 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
''' In URLS.py ''' | |
from demoapp.views import get_employee | |
urlpatterns = patterns('', | |
('^get_employee/$',get_employee), | |
''' in views .py ''' | |
from demoapp.models import employee | |
def get_employee(request): | |
employee_id = request.GET['EMPID'] | |
emp = Employee.objects.get(employeeid = employee_id) | |
empDetail = str(emp.employeeid)+","+emp.name+","+str(emp.dob)+","+str(emp.salary) | |
return HttpResponse(empDetail) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment