drf-to-mkdoc 0.1.6__py3-none-any.whl → 0.1.9__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.

Potentially problematic release.


This version of drf-to-mkdoc might be problematic. Click here for more details.

Files changed (31) hide show
  1. drf_to_mkdoc/__init__.py +1 -1
  2. drf_to_mkdoc/apps.py +6 -2
  3. drf_to_mkdoc/conf/defaults.py +2 -1
  4. drf_to_mkdoc/conf/settings.py +11 -5
  5. drf_to_mkdoc/management/commands/build_docs.py +61 -19
  6. drf_to_mkdoc/management/commands/generate_docs.py +5 -5
  7. drf_to_mkdoc/management/commands/generate_model_docs.py +1 -0
  8. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/base.css +69 -0
  9. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/endpoint-content.css +117 -0
  10. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/endpoints-grid.css +119 -0
  11. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/responsive.css +57 -50
  12. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/theme-toggle.css +12 -0
  13. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/endpoints/variables.css +64 -21
  14. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/animations.css +25 -0
  15. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/base.css +83 -0
  16. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/model-cards.css +126 -0
  17. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/model-tables.css +57 -0
  18. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/responsive.css +51 -0
  19. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/models/variables.css +46 -0
  20. drf_to_mkdoc/utils/common.py +39 -32
  21. drf_to_mkdoc/utils/{endpoint_generator.py → endpoint_detail_generator.py} +214 -384
  22. drf_to_mkdoc/utils/endpoint_list_generator.py +234 -0
  23. drf_to_mkdoc/utils/extractors/query_parameter_extractors.py +12 -17
  24. drf_to_mkdoc/utils/{model_generator.py → model_detail_generator.py} +20 -51
  25. drf_to_mkdoc/utils/model_list_generator.py +67 -0
  26. {drf_to_mkdoc-0.1.6.dist-info → drf_to_mkdoc-0.1.9.dist-info}/METADATA +3 -25
  27. {drf_to_mkdoc-0.1.6.dist-info → drf_to_mkdoc-0.1.9.dist-info}/RECORD +30 -23
  28. drf_to_mkdoc/static/drf-to-mkdoc/stylesheets/extra.css +0 -358
  29. {drf_to_mkdoc-0.1.6.dist-info → drf_to_mkdoc-0.1.9.dist-info}/WHEEL +0 -0
  30. {drf_to_mkdoc-0.1.6.dist-info → drf_to_mkdoc-0.1.9.dist-info}/licenses/LICENSE +0 -0
  31. {drf_to_mkdoc-0.1.6.dist-info → drf_to_mkdoc-0.1.9.dist-info}/top_level.txt +0 -0
@@ -1,358 +0,0 @@
1
- /* Custom styles for Tabib API Documentation */
2
-
3
- /* Status badges for HTTP methods */
4
- .method-badge {
5
- display: inline-block;
6
- padding: 2px 8px;
7
- border-radius: 4px;
8
- font-size: 0.8em;
9
- font-weight: bold;
10
- color: white;
11
- margin-right: 8px;
12
- }
13
-
14
- .method-get { background-color: #28a745; }
15
- .method-post { background-color: #007bff; }
16
- .method-put { background-color: #ffc107; color: #212529; }
17
- .method-patch { background-color: #6f42c1; }
18
- .method-delete { background-color: #dc3545; }
19
-
20
- /* Enhanced code blocks */
21
- .highlight pre {
22
- border-left: 4px solid var(--md-primary-fg-color);
23
- background-color: var(--md-code-bg-color);
24
- padding: 1rem;
25
- border-radius: 0.2rem;
26
- }
27
-
28
- /* Model field tables */
29
- table {
30
- border-collapse: collapse;
31
- width: 100%;
32
- margin: 1rem 0;
33
- }
34
-
35
- table th {
36
- background-color: var(--md-primary-fg-color--light);
37
- color: var(--md-primary-bg-color);
38
- padding: 0.75rem;
39
- text-align: left;
40
- font-weight: 600;
41
- }
42
-
43
- table td {
44
- padding: 0.75rem;
45
- border-bottom: 1px solid var(--md-default-fg-color--lightest);
46
- }
47
-
48
- table tr:hover {
49
- background-color: var(--md-accent-fg-color--transparent);
50
- }
51
-
52
- /* Field and method grids */
53
- .field-grid, .method-grid {
54
- display: grid;
55
- grid-template-columns: repeat(auto-fit, minmax(300px, 1fr));
56
- gap: 1rem;
57
- margin: 1rem 0;
58
- }
59
-
60
- .field-item, .method-item {
61
- background-color: var(--md-default-bg-color);
62
- border: 1px solid var(--md-default-fg-color--lightest);
63
- border-radius: 0.2rem;
64
- padding: 1rem;
65
- }
66
-
67
- .field-item h4, .method-item h4 {
68
- margin-top: 0;
69
- color: var(--md-primary-fg-color);
70
- }
71
-
72
- /* API endpoint sections */
73
- .endpoint-section {
74
- border-left: 4px solid var(--md-accent-fg-color);
75
- padding-left: 1rem;
76
- margin: 2rem 0;
77
- }
78
-
79
- .endpoint-header {
80
- display: flex;
81
- align-items: center;
82
- margin-bottom: 1rem;
83
- }
84
-
85
- .endpoint-path {
86
- font-family: var(--md-code-font);
87
- background-color: var(--md-code-bg-color);
88
- padding: 0.2rem 0.5rem;
89
- border-radius: 0.2rem;
90
- margin-left: 0.5rem;
91
- }
92
-
93
- /* Navigation enhancements */
94
- .md-nav__item--active > .md-nav__link {
95
- font-weight: 600;
96
- }
97
-
98
- /* Admonition customizations */
99
- .admonition.note {
100
- border-left-color: var(--md-primary-fg-color);
101
- }
102
-
103
- .admonition.tip {
104
- border-left-color: #00c853;
105
- }
106
-
107
- .admonition.warning {
108
- border-left-color: #ff9800;
109
- }
110
-
111
- .admonition.danger {
112
- border-left-color: #f44336;
113
- }
114
-
115
- /* Search result enhancements */
116
- .md-search-result__meta {
117
- color: var(--md-default-fg-color--light);
118
- }
119
-
120
- /* Responsive design improvements */
121
- @media screen and (max-width: 768px) {
122
- .field-grid, .method-grid {
123
- grid-template-columns: 1fr;
124
- }
125
-
126
- .endpoint-header {
127
- flex-direction: column;
128
- align-items: flex-start;
129
- }
130
-
131
- .endpoint-path {
132
- margin-left: 0;
133
- margin-top: 0.5rem;
134
- }
135
- }
136
-
137
- /* Code syntax highlighting enhancements */
138
- .codehilite .k { color: #0066cc; } /* Keywords */
139
- .codehilite .s { color: #009900; } /* Strings */
140
- .codehilite .c { color: #999999; } /* Comments */
141
- .codehilite .n { color: #333333; } /* Names */
142
- .codehilite .o { color: #666666; } /* Operators */
143
-
144
- /* Dark mode adjustments */
145
- [data-md-color-scheme="slate"] .field-item,
146
- [data-md-color-scheme="slate"] .method-item {
147
- background-color: var(--md-code-bg-color);
148
- border-color: var(--md-default-fg-color--lightest);
149
- }
150
-
151
- [data-md-color-scheme="slate"] table th {
152
- background-color: var(--md-primary-fg-color);
153
- color: var(--md-primary-bg-color);
154
- }
155
-
156
- /* Custom icons for different sections */
157
- .md-nav__item[data-md-level="1"] > .md-nav__link[href*="models"] {
158
- position: relative;
159
- }
160
-
161
- .md-nav__item[data-md-level="1"] > .md-nav__link[href*="models"]::before {
162
- content: "🗃️";
163
- margin-right: 0.5rem;
164
- }
165
-
166
- .md-nav__item[data-md-level="1"] > .md-nav__link[href*="endpoints"] {
167
- position: relative;
168
- }
169
-
170
- .md-nav__item[data-md-level="1"] > .md-nav__link[href*="endpoints"]::before {
171
- content: "🔗";
172
- margin-right: 0.5rem;
173
- }
174
-
175
- /* Print styles */
176
- @media print {
177
- .md-header, .md-sidebar, .md-footer {
178
- display: none;
179
- }
180
-
181
- .md-content {
182
- margin: 0;
183
- }
184
-
185
- .highlight pre {
186
- border: 1px solid #ccc;
187
- page-break-inside: avoid;
188
- }
189
- }
190
-
191
- /* =================== DJANGO MODELS CARD LAYOUT =================== */
192
-
193
- /* Models container */
194
- .models-container {
195
- max-width: 100%;
196
- margin: 0 auto;
197
- }
198
-
199
- /* App description styling */
200
- .app-description {
201
- font-size: 1rem;
202
- color: var(--md-default-fg-color--light);
203
- margin-bottom: 1.5rem;
204
- padding: 0.5rem 0;
205
- border-bottom: 1px solid var(--md-default-fg-color--lightest);
206
- }
207
-
208
- /* Model cards grid */
209
- .model-cards {
210
- display: grid;
211
- grid-template-columns: repeat(auto-fill, minmax(280px, 1fr));
212
- gap: 1.5rem;
213
- margin-bottom: 3rem;
214
- }
215
-
216
- /* Individual model card */
217
- .model-card {
218
- background: var(--md-default-bg-color);
219
- border: 1px solid var(--md-default-fg-color--lightest);
220
- border-radius: 8px;
221
- padding: 1.5rem;
222
- transition: all 0.3s ease;
223
- box-shadow: 0 2px 4px rgba(0, 0, 0, 0.1);
224
- position: relative;
225
- overflow: hidden;
226
- }
227
-
228
- .model-card:hover {
229
- transform: translateY(-4px);
230
- box-shadow: 0 8px 16px rgba(0, 0, 0, 0.15);
231
- border-color: var(--md-primary-fg-color);
232
- }
233
-
234
- .model-card::before {
235
- content: '';
236
- position: absolute;
237
- top: 0;
238
- left: 0;
239
- right: 0;
240
- height: 4px;
241
- background: linear-gradient(90deg, var(--md-primary-fg-color), var(--md-accent-fg-color));
242
- opacity: 0;
243
- transition: opacity 0.3s ease;
244
- }
245
-
246
- .model-card:hover::before {
247
- opacity: 1;
248
- }
249
-
250
- /* Model header */
251
- .model-header {
252
- display: flex;
253
- justify-content: space-between;
254
- align-items: center;
255
- margin-bottom: 0.5rem;
256
- }
257
-
258
- .model-header h3 {
259
- margin: 0;
260
- font-size: 1.25rem;
261
- font-weight: 600;
262
- }
263
-
264
- .model-header h3 a {
265
- color: var(--md-default-fg-color);
266
- text-decoration: none;
267
- transition: color 0.3s ease;
268
- }
269
-
270
- .model-header h3 a:hover {
271
- color: var(--md-primary-fg-color);
272
- }
273
-
274
- /* Model badge */
275
- .model-badge {
276
- display: inline-block;
277
- padding: 0.25rem 0.75rem;
278
- background: var(--md-primary-fg-color);
279
- color: var(--md-primary-bg-color);
280
- border-radius: 20px;
281
- font-size: 0.75rem;
282
- font-weight: 600;
283
- text-transform: uppercase;
284
- letter-spacing: 0.5px;
285
- }
286
-
287
- /* Dark mode adjustments for model cards */
288
- [data-md-color-scheme="slate"] .model-card {
289
- background: var(--md-code-bg-color);
290
- border-color: var(--md-default-fg-color--lightest);
291
- }
292
-
293
- [data-md-color-scheme="slate"] .model-card:hover {
294
- border-color: var(--md-primary-fg-color);
295
- box-shadow: 0 8px 16px rgba(255, 255, 255, 0.1);
296
- }
297
-
298
- [data-md-color-scheme="slate"] .app-description {
299
- color: var(--md-default-fg-color--light);
300
- border-color: var(--md-default-fg-color--lightest);
301
- }
302
-
303
- /* Responsive adjustments for model cards */
304
- @media screen and (max-width: 768px) {
305
- .model-cards {
306
- grid-template-columns: 1fr;
307
- gap: 1rem;
308
- }
309
-
310
- .model-card {
311
- padding: 1rem;
312
- }
313
-
314
- .model-header h3 {
315
- font-size: 1.1rem;
316
- }
317
-
318
- .model-badge {
319
- font-size: 0.7rem;
320
- padding: 0.2rem 0.6rem;
321
- }
322
- }
323
-
324
- @media screen and (max-width: 480px) {
325
- .model-header {
326
- flex-direction: column;
327
- align-items: flex-start;
328
- gap: 0.5rem;
329
- }
330
-
331
- .model-badge {
332
- align-self: flex-start;
333
- }
334
- }
335
-
336
- /* Animation for cards appearing */
337
- @keyframes fadeInUp {
338
- from {
339
- opacity: 0;
340
- transform: translateY(20px);
341
- }
342
- to {
343
- opacity: 1;
344
- transform: translateY(0);
345
- }
346
- }
347
-
348
- .model-card {
349
- animation: fadeInUp 0.6s ease-out;
350
- }
351
-
352
- /* Stagger animation for multiple cards */
353
- .model-card:nth-child(1) { animation-delay: 0.1s; }
354
- .model-card:nth-child(2) { animation-delay: 0.2s; }
355
- .model-card:nth-child(3) { animation-delay: 0.3s; }
356
- .model-card:nth-child(4) { animation-delay: 0.4s; }
357
- .model-card:nth-child(5) { animation-delay: 0.5s; }
358
- .model-card:nth-child(6) { animation-delay: 0.6s; }