Update fixture and PagePropFrom

This commit is contained in:
Skia 2015-11-27 16:09:47 +01:00
parent 0b962e2380
commit edcbf7a367
4 changed files with 9 additions and 3 deletions

View File

@ -1 +1 @@
[{"fields": {"permissions": [1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12, 19, 20, 21, 22, 25, 23, 24, 16, 17, 18, 13, 14, 15]}, "pk": 1, "model": "core.group"}]
[{"pk": 1, "fields": {"permissions": [1, 2, 3, 7, 8, 9, 4, 5, 6, 10, 11, 12, 19, 20, 21, 22, 25, 23, 24, 16, 17, 18, 13, 14, 15]}, "model": "core.group"}, {"pk": 2, "fields": {"permissions": [25]}, "model": "core.group"}, {"pk": 3, "fields": {"permissions": []}, "model": "core.group"}]

View File

@ -1 +1 @@
[{"model": "core.page", "pk": 1, "fields": {"title": "TROLL", "full_name": "guy2", "content": "ZZZZZZZZZZZZZZZZZZZZZ", "name": "guy2", "parent": null, "revision": 1, "is_locked": false}}, {"model": "core.page", "pk": 2, "fields": {"title": "Bibou", "full_name": "guy/bibou", "content": "Bibou Troll", "name": "bibou", "parent": 4, "revision": 1, "is_locked": false}}, {"model": "core.page", "pk": 3, "fields": {"title": "Troll", "full_name": "guy/bibou/troll", "content": "blbbllblbl", "name": "troll", "parent": 2, "revision": 1, "is_locked": false}}, {"model": "core.page", "pk": 4, "fields": {"title": "TROLL", "full_name": "guy", "content": "", "name": "guy", "parent": null, "revision": 1, "is_locked": false}}, {"model": "core.page", "pk": 5, "fields": {"title": "Bibou", "full_name": "bibou", "content": "", "name": "bibou", "parent": null, "revision": 1, "is_locked": false}}, {"model": "core.page", "pk": 6, "fields": {"title": "Bibou-Guy", "full_name": "bibou/guy", "content": "Bwahahahahahaha", "name": "guy", "parent": 5, "revision": 1, "is_locked": false}}]
[{"fields": {"edit_group": [], "revision": 1, "owner_group": 1, "view_group": [], "title": "TROLL", "is_locked": false, "full_name": "guy2", "parent": null, "name": "guy2", "content": "ZZZZZZZZZZZZZZZZZZZZZ"}, "pk": 1, "model": "core.page"}, {"fields": {"edit_group": [], "revision": 1, "owner_group": 3, "view_group": [], "title": "Bibou", "is_locked": false, "full_name": "guy/bibou", "parent": 4, "name": "bibou", "content": "Bibou Troll Homo\r\n"}, "pk": 2, "model": "core.page"}, {"fields": {"edit_group": [], "revision": 1, "owner_group": 1, "view_group": [], "title": "Troll", "is_locked": false, "full_name": "guy/bibou/troll", "parent": 2, "name": "troll", "content": "blbbllblbl"}, "pk": 3, "model": "core.page"}, {"fields": {"edit_group": [], "revision": 1, "owner_group": 1, "view_group": [], "title": "TROLL", "is_locked": false, "full_name": "guy", "parent": null, "name": "guy", "content": ""}, "pk": 4, "model": "core.page"}, {"fields": {"edit_group": [1], "revision": 1, "owner_group": 3, "view_group": [], "title": "Bibou", "is_locked": false, "full_name": "bibou", "parent": null, "name": "bibou", "content": ""}, "pk": 5, "model": "core.page"}, {"fields": {"edit_group": [], "revision": 1, "owner_group": 1, "view_group": [], "title": "Bibou-Guy", "is_locked": false, "full_name": "bibou/guy", "parent": 5, "name": "guy", "content": "Bwahahahahahaha\r\n\r\n\r\n\r\ntroll"}, "pk": 6, "model": "core.page"}]

View File

@ -1 +1 @@
[{"model": "core.user", "pk": 1, "fields": {"is_staff": true, "password": "pbkdf2_sha256$20000$MDukCN5X8Bof$rYdhppKiusj+W/1Rxpy0yuYsEyWocESEjtRsopkOc5c=", "first_name": "Ro", "is_active": true, "date_of_birth": "1969-12-31T23:00:00Z", "date_joined": "2015-11-19T16:05:51.764Z", "nick_name": "", "is_superuser": true, "username": "root", "email": "bibou@git.an", "last_login": "2015-11-19T16:16:59.539Z", "last_name": "Ot", "user_permissions": [], "groups": []}}, {"model": "core.user", "pk": 2, "fields": {"is_staff": false, "password": "pbkdf2_sha256$20000$UK9a29p5bBEh$Jzv7xs0W9njJZiXfIdYXDydim/3YHs6awKwDmN7gSAc=", "first_name": "Skia", "is_active": true, "date_of_birth": "1969-12-31T23:00:00Z", "date_joined": "2015-11-19T16:06:29.556Z", "nick_name": "", "is_superuser": false, "username": "skia", "email": "plop@libskia.so", "last_login": "2015-11-19T16:16:49.606Z", "last_name": "Kia", "user_permissions": [], "groups": []}}]
[{"model": "core.user", "pk": 1, "fields": {"first_name": "Ro", "date_joined": "2015-11-19T16:05:51.764Z", "groups": [], "password": "pbkdf2_sha256$20000$MDukCN5X8Bof$rYdhppKiusj+W/1Rxpy0yuYsEyWocESEjtRsopkOc5c=", "last_name": "Ot", "nick_name": "", "username": "root", "user_permissions": [], "email": "bibou@git.an", "last_login": "2015-11-26T16:28:36.464Z", "date_of_birth": "1969-12-31T23:00:00Z", "is_superuser": true, "is_active": true, "is_staff": true}}, {"model": "core.user", "pk": 2, "fields": {"first_name": "Skia", "date_joined": "2015-11-19T16:06:29.556Z", "groups": [3], "password": "pbkdf2_sha256$20000$UK9a29p5bBEh$Jzv7xs0W9njJZiXfIdYXDydim/3YHs6awKwDmN7gSAc=", "last_name": "Kia", "nick_name": "", "username": "skia", "user_permissions": [], "email": "plop@libskia.so", "last_login": "2015-11-26T16:37:01.671Z", "date_of_birth": "1969-12-31T23:00:00Z", "is_superuser": false, "is_active": true, "is_staff": false}}]

View File

@ -44,6 +44,12 @@ class PagePropForm(forms.ModelForm):
'view_group': CheckboxSelectMultiple,
}
def __init__(self, *arg, **kwargs):
super(PagePropForm, self).__init__(*arg, **kwargs)
self.fields['edit_group'].required = False
self.fields['view_group'].required = False
class GroupEditForm(forms.ModelForm):
error_css_class = 'error'
required_css_class = 'required'