i have a problem about permissions on view of Django. 

My code on view.py:

```
@login_required(login_url='/kullaniciGirisi/')
@permission_required('reservationApp.change_reservation', login_url='/')
def rezervasyonDuzenle(request, id):

```

there are two app: App1: userLogin, App2: reservationApp

i assigned the permissions on userLogin and but i used permission\_required on reservationApp

Assignments:

```
  username = request.POST['username']
  password = request.POST['password']
  user = authenticate(username=username, password=password)
  pr = Permission.objects.get(codename='change_reservation')
  group = Group.objects.get(name='rol1')
  group.permissions.add(pr)
  userN = User.objects.get(username=username)
  userN.groups.add(group)

```

permission\_required is not working, everytime it return to login\_url :/
Do you have any idea about problem?