def post_detail(request):
posts = []
with open('/home/martin/Downloads/site1/site1/reg/newusers.csv', 'rb') as csvfile:
reader = csv.DictReader(csvfile)
for row in reader:
if len(row['name'].strip()) > 0 and len(row['project'].strip()) > 0 and len(row['initial password'].strip()) > 0 and len(row['email address'].strip()) > 0 and len(row['company'].strip()) > 0 and len(row['userType'].strip()) > 0 and len(row['businessType'].strip()) > 0 and len(row['contact'].strip()) > 0 and len(row['name'].strip()) > 0:
eachbracket = {'name' : row['name'].strip(), 'project' : row['project'].strip(), 'businessType' : row['businessType'].strip(), 'userType' : row['userType'].strip(), 'company' : row['company'].strip()}
posts = posts + [eachbracket];
print posts
return render(request, 'approval.html')