django-restit 4.2.91__py3-none-any.whl → 4.2.93__py3-none-any.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- account/models/group.py +3 -1
- {django_restit-4.2.91.dist-info → django_restit-4.2.93.dist-info}/METADATA +2 -2
- {django_restit-4.2.91.dist-info → django_restit-4.2.93.dist-info}/RECORD +7 -7
- wiki/models/page.py +2 -0
- wiki/rpc/wiki.py +3 -3
- {django_restit-4.2.91.dist-info → django_restit-4.2.93.dist-info}/LICENSE.md +0 -0
- {django_restit-4.2.91.dist-info → django_restit-4.2.93.dist-info}/WHEEL +0 -0
account/models/group.py
CHANGED
@@ -211,7 +211,9 @@ class Group(models.Model, RestModel, MetaDataModel):
|
|
211
211
|
self.name = None
|
212
212
|
|
213
213
|
def set_parent(self, value):
|
214
|
-
if
|
214
|
+
if not value:
|
215
|
+
value = None
|
216
|
+
else:
|
215
217
|
if int(value) == self.pk:
|
216
218
|
raise RestValidationError("cannot set self as parent", 1101)
|
217
219
|
value = Group.objects.filter(pk=value).last()
|
@@ -1,6 +1,6 @@
|
|
1
1
|
Metadata-Version: 2.1
|
2
2
|
Name: django-restit
|
3
|
-
Version: 4.2.
|
3
|
+
Version: 4.2.93
|
4
4
|
Summary: A Rest Framework for DJANGO
|
5
5
|
License: MIT
|
6
6
|
Author: Ian Starnes
|
@@ -21,7 +21,7 @@ Requires-Dist: fido2
|
|
21
21
|
Requires-Dist: gevent (>=23.7.0,<24.0.0)
|
22
22
|
Requires-Dist: hashids (>=1.3.1,<2.0.0)
|
23
23
|
Requires-Dist: inlinestyler
|
24
|
-
Requires-Dist: mistune
|
24
|
+
Requires-Dist: mistune (>=2.0.4,<3.0.0)
|
25
25
|
Requires-Dist: phonenumbers
|
26
26
|
Requires-Dist: pillow
|
27
27
|
Requires-Dist: psutil
|
@@ -26,7 +26,7 @@ account/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuF
|
|
26
26
|
account/models/__init__.py,sha256=cV_lMnT2vL_mjiYtT4hlcIHo52ocFbGSNVkOIHHLXZY,385
|
27
27
|
account/models/device.py,sha256=TloXvvrx3khF3BeGFuVYn6DhXjOW0AMZb4F9Fl5nBII,5491
|
28
28
|
account/models/feeds.py,sha256=vI7fG4ASY1M0Zjke24RdnfDcuWeATl_yR_25jPmT64g,2011
|
29
|
-
account/models/group.py,sha256=
|
29
|
+
account/models/group.py,sha256=mjWwePt3ogQUo9m0EhURMz0aBrVVx_0Drr0lNDESQio,22281
|
30
30
|
account/models/legacy.py,sha256=zYdtv4LC0ooxPVqWM-uToPwV-lYWQLorSE6p6yn1xDw,2720
|
31
31
|
account/models/member.py,sha256=8xi-NahJipic_ut81vCFG-hY9x1U-trZ9KhnhIHAaFM,53092
|
32
32
|
account/models/membership.py,sha256=90EpAhOsGaqphDAkONP6j_qQ0OWSRaQsI8H7E7fgMkE,9249
|
@@ -479,7 +479,7 @@ wiki/migrations/0002_alter_pagemedia_entry.py,sha256=9CUnfvBmj0D4akCkux7HFuXgw9B
|
|
479
479
|
wiki/migrations/__init__.py,sha256=47DEQpj8HBSa-_TImW-5JCeuQeRkm5NMpJWZG3hSuFU,0
|
480
480
|
wiki/models/__init__.py,sha256=jE-9r_Hqpyo7ysKu9BschXOn5Zg34wUt894GwJpxA28,132
|
481
481
|
wiki/models/faq.py,sha256=nvcEFerllQKT61kIYlasvZzRKwpXyfmQpiqkpHP1V1o,1745
|
482
|
-
wiki/models/page.py,sha256=
|
482
|
+
wiki/models/page.py,sha256=JlcdT0ZLbhumJj0O5BvfAwhaO4hKgDlAcfuLx6NRPLU,7299
|
483
483
|
wiki/models/revision.py,sha256=St5-vz8SGvogsDL6jTWqHLE23PS5mp9iA0DUt3hWTsU,729
|
484
484
|
wiki/periodic.py,sha256=t-UgXJIug-OLslJM_r03-5WrNKj39TxrvfuNFjVAhDs,334
|
485
485
|
wiki/renderers/__init__.py,sha256=lLEoJvjU3ezXwBGcjleKk_kMyNeMD9MpfBlEiKayEiM,461
|
@@ -491,7 +491,7 @@ wiki/renderers/mistune/meta.py,sha256=1lry9m-4wiwsivWnqYHYjwmGv91BGUSB7niJuZ1Xx5
|
|
491
491
|
wiki/renderers/mistune/task_list.py,sha256=Ex0gUPX_d9jtbPbnEEktlqAJsM6wIt5Md2wsltX7LIY,1889
|
492
492
|
wiki/renderers/mistune/toc.py,sha256=TKGiuMVpKqzDGUx5bAjJYpZIzG6n3wTjtuBdBc-TM_8,2302
|
493
493
|
wiki/rpc/__init__.py,sha256=RgDYw5NSWxvx-VO3f9ONWNqhAgvec_4_IBfvZCsOR9I,40
|
494
|
-
wiki/rpc/wiki.py,sha256=
|
494
|
+
wiki/rpc/wiki.py,sha256=RQY1gtqxdNhp13n3SkZL9WZ6RatrtCIh7QOYta6-UUU,1327
|
495
495
|
wiki/tq.py,sha256=wvuBZ3OMV_D2o4kpJhVLIOwpEUfwlglqLJQvpncAwtk,313
|
496
496
|
ws4redis/README.md,sha256=QvwdsauPKxx4qQqnJ991xeU8DgFQCj3CeQt-nCE4s-w,3624
|
497
497
|
ws4redis/__init__.py,sha256=teNfv83A_ke1CBt9BB7NsnWCcFBhnUFPsPESjF554_k,46
|
@@ -506,7 +506,7 @@ ws4redis/servers/uwsgi.py,sha256=VyhoCI1DnVFqBiJYHoxqn5Idlf6uJPHvfBKgkjs34mo,172
|
|
506
506
|
ws4redis/settings.py,sha256=K0yBiLUuY81iDM4Yr-k8hbvjn5VVHu5zQhmMK8Dtz0s,1536
|
507
507
|
ws4redis/utf8validator.py,sha256=S0OlfjeGRP75aO6CzZsF4oTjRQAgR17OWE9rgZdMBZA,5122
|
508
508
|
ws4redis/websocket.py,sha256=R0TUyPsoVRD7Y_oU7w2I6NL4fPwiz5Vl94-fUkZgLHA,14848
|
509
|
-
django_restit-4.2.
|
510
|
-
django_restit-4.2.
|
511
|
-
django_restit-4.2.
|
512
|
-
django_restit-4.2.
|
509
|
+
django_restit-4.2.93.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
|
510
|
+
django_restit-4.2.93.dist-info/METADATA,sha256=OCowDR53jgY3SaLn5JQEG2TnwCYW_NBhDQfj9Zdq6Oc,7662
|
511
|
+
django_restit-4.2.93.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
|
512
|
+
django_restit-4.2.93.dist-info/RECORD,,
|
wiki/models/page.py
CHANGED
@@ -14,6 +14,7 @@ class Page(dm.Model, rm.RestModel, rm.MetaDataModel):
|
|
14
14
|
SEARCH_FIELDS = ["title", "body"]
|
15
15
|
SEARCH_TERMS = ["title", "body"]
|
16
16
|
QUERY_FIELDS = ["all_fields", "parent__path"]
|
17
|
+
VIEW_PERMS = ["view_wiki", "edit_wiki"]
|
17
18
|
UNIQUE_LOOKUP = ["path"]
|
18
19
|
DEFAULT_SORT = "-order"
|
19
20
|
CAN_DELETE = True
|
@@ -205,6 +206,7 @@ class PageMetaData(rm.MetaDataBase):
|
|
205
206
|
|
206
207
|
class PageMedia(dm.Model, rm.RestModel):
|
207
208
|
class RestMeta:
|
209
|
+
VIEW_PERMS = ["view_wiki", "edit_wiki"]
|
208
210
|
GRAPHS = {
|
209
211
|
"basic": {
|
210
212
|
"graphs": {
|
wiki/rpc/wiki.py
CHANGED
@@ -5,14 +5,14 @@ from wiki import models as wiki
|
|
5
5
|
|
6
6
|
@rd.url('page')
|
7
7
|
@rd.url('page/<int:pk>')
|
8
|
-
|
8
|
+
@rd.login_required
|
9
9
|
def rest_on_manage_wiki(request, pk=None):
|
10
10
|
return wiki.Page.on_rest_request(request, pk)
|
11
11
|
|
12
12
|
|
13
13
|
@rd.url('path')
|
14
14
|
@rd.url('path/<path:path>')
|
15
|
-
|
15
|
+
@rd.login_required
|
16
16
|
def rest_on_wiki(request, path=None):
|
17
17
|
if path:
|
18
18
|
entry = wiki.Page.objects.filter(path=path).last()
|
@@ -36,6 +36,6 @@ def rest_on_wiki(request, path=None):
|
|
36
36
|
|
37
37
|
@rd.url('media')
|
38
38
|
@rd.url('media/<int:pk>')
|
39
|
-
|
39
|
+
@rd.login_required
|
40
40
|
def rest_on_wiki_media(request, pk=None):
|
41
41
|
return wiki.PageMedia.on_rest_request(request, pk)
|
File without changes
|
File without changes
|