We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 6b2ed4a commit bd37628Copy full SHA for bd37628
tests/test_permissions.py
@@ -3,6 +3,7 @@
3
import base64
4
import unittest
5
6
+import django
7
from django.contrib.auth.models import Group, Permission, User
8
from django.db import models
9
from django.test import TestCase
@@ -248,10 +249,12 @@ class BasicPermModel(models.Model):
248
249
250
class Meta:
251
app_label = 'tests'
- permissions = (
252
- ('view_basicpermmodel', 'Can view basic perm model'),
253
- # add, change, delete built in to django
254
- )
+
+ if django.VERSION <= (2, 1):
+ permissions = (
255
+ ('view_basicpermmodel', 'Can view basic perm model'),
256
+ # add, change, delete built in to django
257
+ )
258
259
260
class BasicPermSerializer(serializers.ModelSerializer):
0 commit comments