django-restit 4.2.92__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.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.1
2
2
  Name: django-restit
3
- Version: 4.2.92
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
@@ -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=YLsuzYZZ8Vs1H8akwMrWxg6G7_EbRYp86tUry43hfnE,7203
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=iWehZasU8J1E5sPPqz9QoQr3MpGxqu3rd7CH4wFrm2w,1333
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.92.dist-info/LICENSE.md,sha256=VHN4hhEeVOoFjtG-5fVv4jesA4SWi0Z-KgOzzN6a1ps,1068
510
- django_restit-4.2.92.dist-info/METADATA,sha256=Cc0596dSa_nBz3E8F6ac6yxrVhzob92fIQzzqhiIc9Y,7645
511
- django_restit-4.2.92.dist-info/WHEEL,sha256=sP946D7jFCHeNz5Iq4fL4Lu-PrWrFsgfLXbbkciIZwg,88
512
- django_restit-4.2.92.dist-info/RECORD,,
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
- # @rd.login_required
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
- # @rd.login_required
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
- # @rd.login_required
39
+ @rd.login_required
40
40
  def rest_on_wiki_media(request, pk=None):
41
41
  return wiki.PageMedia.on_rest_request(request, pk)