Browse Source

add comment for future cleanup

Guénaël Muller 7 years ago
parent
commit
fa3426fc78

+ 1 - 1
tracim/tests/views/test_example.py View File

1
 # -*- coding: utf-8 -*-
1
 # -*- coding: utf-8 -*-
2
-# TODO - G.M - [Cleanup] Drop this file
2
+# TODO - G.M - [Cleanup][tempExample] Drop this file
3
 # import unittest
3
 # import unittest
4
 # import transaction
4
 # import transaction
5
 #
5
 #

+ 17 - 0
tracim/views/default/default_controller.py View File

34
             response = HTTPForbidden()
34
             response = HTTPForbidden()
35
         return response
35
         return response
36
 
36
 
37
+    # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
37
     @classmethod
38
     @classmethod
38
     def test_config(cls, request):
39
     def test_config(cls, request):
39
         try:
40
         try:
43
             return Response(e, content_type='text/plain', status=500)
44
             return Response(e, content_type='text/plain', status=500)
44
         return {'project': project}
45
         return {'project': project}
45
 
46
 
47
+    # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
46
     @classmethod
48
     @classmethod
47
     def test_contributor_page(cls, request):
49
     def test_contributor_page(cls, request):
48
         try:
50
         try:
52
             return Response(e, content_type='text/plain', status=500)
54
             return Response(e, content_type='text/plain', status=500)
53
         return {'project': project}
55
         return {'project': project}
54
 
56
 
57
+    # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
55
     @classmethod
58
     @classmethod
56
     def test_admin_page(cls, request):
59
     def test_admin_page(cls, request):
57
         try:
60
         try:
61
             return Response(e, content_type='text/plain', status=500)
64
             return Response(e, content_type='text/plain', status=500)
62
         return {'project': project}
65
         return {'project': project}
63
 
66
 
67
+    # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
64
     @classmethod
68
     @classmethod
65
     def test_manager_page(cls, request):
69
     def test_manager_page(cls, request):
66
         try:
70
         try:
70
             return Response(e, content_type='text/plain', status=500)
74
             return Response(e, content_type='text/plain', status=500)
71
         return {'project': project}
75
         return {'project': project}
72
 
76
 
77
+    # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
73
     @classmethod
78
     @classmethod
74
     def test_user_page(cls, request):
79
     def test_user_page(cls, request):
75
         try:
80
         try:
80
         return {'project': project}
85
         return {'project': project}
81
 
86
 
82
     def bind(self, configurator: Configurator):
87
     def bind(self, configurator: Configurator):
88
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop static files
83
         configurator.add_static_view('static', 'static', cache_max_age=3600)
89
         configurator.add_static_view('static', 'static', cache_max_age=3600)
90
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Do not rely
91
+        # on static file for 404 view
84
         configurator.add_view(
92
         configurator.add_view(
85
             self.notfound_view,
93
             self.notfound_view,
86
             renderer='tracim:templates/404.jinja2',
94
             renderer='tracim:templates/404.jinja2',
87
             context=NotFound,
95
             context=NotFound,
88
         )
96
         )
89
 
97
 
98
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
90
         configurator.add_route('test_config', '/')
99
         configurator.add_route('test_config', '/')
91
         configurator.add_view(
100
         configurator.add_view(
92
             self.test_config,
101
             self.test_config,
94
             renderer='tracim:templates/mytemplate.jinja2',
103
             renderer='tracim:templates/mytemplate.jinja2',
95
         )
104
         )
96
 
105
 
106
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
97
         configurator.add_route('test_contributor', '/test_contributor')
107
         configurator.add_route('test_contributor', '/test_contributor')
98
         configurator.add_view(
108
         configurator.add_view(
99
             self.test_contributor_page,
109
             self.test_contributor_page,
101
             renderer='tracim:templates/mytemplate.jinja2',
111
             renderer='tracim:templates/mytemplate.jinja2',
102
             permission=CONTRIBUTE_PERM,
112
             permission=CONTRIBUTE_PERM,
103
         )
113
         )
114
+
115
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
104
         configurator.add_route('test_admin', '/test_admin')
116
         configurator.add_route('test_admin', '/test_admin')
105
         configurator.add_view(
117
         configurator.add_view(
106
             self.test_admin_page,
118
             self.test_admin_page,
108
             renderer='tracim:templates/mytemplate.jinja2',
120
             renderer='tracim:templates/mytemplate.jinja2',
109
             permission=ADMIN_PERM,
121
             permission=ADMIN_PERM,
110
         )
122
         )
123
+
124
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
111
         configurator.add_route('test_manager', '/test_manager')
125
         configurator.add_route('test_manager', '/test_manager')
112
         configurator.add_view(
126
         configurator.add_view(
113
             self.test_user_page,
127
             self.test_user_page,
115
             renderer='tracim:templates/mytemplate.jinja2',
129
             renderer='tracim:templates/mytemplate.jinja2',
116
             permission=MANAGE_GLOBAL_PERM,
130
             permission=MANAGE_GLOBAL_PERM,
117
         )
131
         )
132
+
133
+        # TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this method
118
         configurator.add_route('test_user', '/test_user')
134
         configurator.add_route('test_user', '/test_user')
119
         configurator.add_view(
135
         configurator.add_view(
120
             self.test_user_page,
136
             self.test_user_page,
122
             renderer='tracim:templates/mytemplate.jinja2',
138
             renderer='tracim:templates/mytemplate.jinja2',
123
             permission=USER_PERM,
139
             permission=USER_PERM,
124
         )
140
         )
141
+
125
         configurator.add_forbidden_view(self.forbidden_view)
142
         configurator.add_forbidden_view(self.forbidden_view)

+ 1 - 0
tracim/views/example_api/example_api_controller.py View File

1
 # -*- coding: utf-8 -*-
1
 # -*- coding: utf-8 -*-
2
+# TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this file
2
 from datetime import datetime
3
 from datetime import datetime
3
 
4
 
4
 from pyramid.config import Configurator
5
 from pyramid.config import Configurator

+ 1 - 0
tracim/views/example_api/schema.py View File

1
 # -*- coding: utf-8 -*-
1
 # -*- coding: utf-8 -*-
2
+# TODO - G.M - 10-04-2018 - [cleanup][tempExample] - Drop this file
2
 import marshmallow
3
 import marshmallow
3
 
4
 
4
 
5