@@ -104,7 +104,8 def location(request, id_loc): | |||||
104 | return render(request, 'location.html', kwargs) |
|
104 | return render(request, 'location.html', kwargs) | |
105 |
|
105 | |||
106 |
|
106 | |||
107 | @staff_member_required(login_url='accounts:login') |
|
107 | from django.contrib.auth.decorators import user_passes_test | |
|
108 | @user_passes_test(lambda u:u.is_staff, login_url='accounts:login') | |||
108 | def location_new(request): |
|
109 | def location_new(request): | |
109 |
|
110 | |||
110 | if request.method == 'GET': |
|
111 | if request.method == 'GET': |
General Comments 0
You need to be logged in to leave comments.
Login now