Commit 1917dcc10752b3a84f92be37d0ff9bef4fe3812c
Exists in
master
and in
2 other branches
Merge branch 'refactoring' of https://github.com/amadeusproject/amadeuslms into refactoring
Showing
17 changed files
with
263 additions
and
131 deletions
Show diff stats
backup.json
1 | -[{"id": 6, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 48, "name": "anything"}, {"id": 49, "name": "lsoe"}], "_my_subclass": "webpage", "name": "Doug", "slug": "doug", "brief_description": "<p>Today</p>", "show_window": true, "all_students": false, "visible": false, "order": 1, "create_date": "2017-01-23T17:36:14.900287Z", "last_update": "2017-01-24T17:33:39.433016Z", "content": "Freaky man"}, {"id": 1, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 44, "name": "rvenge"}, {"id": 45, "name": "destruct"}], "_my_subclass": "webpage", "name": "Revenge", "slug": "revenge", "brief_description": "<p>Here Comes</p>", "show_window": false, "all_students": false, "visible": true, "order": 1, "create_date": "2017-01-20T22:42:16.126657Z", "last_update": "2017-01-30T18:39:30.100600Z", "content": "<p>Listen Dammit</p><p>I do know how to make it better thoug</p>"}, {"id": 14, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 58, "name": "survive"}, {"id": 59, "name": "brave"}], "_my_subclass": "webpage", "name": "Care", "slug": "care", "brief_description": "<p>One last minute</p>", "show_window": true, "all_students": false, "visible": true, "order": 2, "create_date": "2017-01-23T17:59:10.053614Z", "last_update": "2017-01-24T21:53:17.119881Z", "content": "You don't really"}, {"id": 20, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 69, "name": "noine"}, {"id": 70, "name": "nine"}], "_my_subclass": "webpage", "name": "Myself", "slug": "myself", "brief_description": "<p>Is up to me</p>", "show_window": false, "all_students": true, "visible": false, "order": 2, "create_date": "2017-01-23T22:59:42.592301Z", "last_update": "2017-01-24T17:34:20.147284Z", "content": "<title>Sold my soul</title><h5>I brought this all <em>upon myself<br>Dont stop me now!!</em></h5>"}, {"id": 3, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 44, "name": "rvenge"}, {"id": 45, "name": "destruct"}], "_my_subclass": "webpage", "name": "Teste 2", "slug": "teste-2", "brief_description": "<p>Here Comes</p>", "show_window": true, "all_students": false, "visible": true, "order": 3, "create_date": "2017-01-23T17:17:28.416904Z", "last_update": "2017-01-24T21:53:17.131082Z", "content": "Listen Dammit"}, {"id": 42, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 95, "name": "history"}], "_my_subclass": "webpage", "name": "History goes", "slug": "history-goes", "brief_description": "<p>How</p>", "show_window": false, "all_students": false, "visible": false, "order": 4, "create_date": "2017-01-24T21:57:13.600718Z", "last_update": "2017-01-24T21:57:13.812438Z", "content": "<p>ON</p>"}, {"id": 4, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 46, "name": "tears"}, {"id": 47, "name": "rain"}], "_my_subclass": "webpage", "name": "Have", "slug": "have", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 5, "create_date": "2017-01-23T17:31:58.957439Z", "last_update": "2017-01-24T21:53:17.155196Z", "content": "Haven't"}, {"id": 21, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 71, "name": "candle"}, {"id": 72, "name": "mass"}], "_my_subclass": "webpage", "name": "Each small candle", "slug": "each-small-candle", "brief_description": "<p>Uhuh</p>", "show_window": false, "all_students": false, "visible": true, "order": 6, "create_date": "2017-01-24T03:16:17.180365Z", "last_update": "2017-01-24T21:53:17.164135Z", "content": "<p>Lights a corner of the dark</p>"}, {"id": 5, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 46, "name": "tears"}, {"id": 47, "name": "rain"}], "_my_subclass": "webpage", "name": "Lose you", "slug": "lose-you", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 7, "create_date": "2017-01-23T17:34:29.313661Z", "last_update": "2017-01-24T21:53:17.175261Z", "content": "Haven't <b>you heard <i>about the sirens <u>going down</u></i></b>"}, {"id": 16, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 62, "name": "sing"}, {"id": 63, "name": "loud"}], "_my_subclass": "webpage", "name": "Sing", "slug": "sing", "brief_description": "<p>Talking about</p>", "show_window": false, "all_students": false, "visible": false, "order": 8, "create_date": "2017-01-23T22:10:39.437832Z", "last_update": "2017-01-24T21:53:17.197911Z", "content": "Sing sing"}, {"id": 49, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "_my_subclass": "webpage", "name": "Testes", "slug": "testes", "brief_description": "<p>asd</p>", "show_window": false, "all_students": false, "visible": true, "order": 9, "create_date": "2017-01-30T18:38:25.741186Z", "last_update": "2017-01-30T18:38:25.878442Z", "content": "<p>COmon</p>"}, {"id": 50, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "_my_subclass": "webpage", "name": "Yellow", "slug": "yellow", "brief_description": "<p>Vber</p>", "show_window": false, "all_students": false, "visible": true, "order": 10, "create_date": "2017-01-30T18:39:04.914450Z", "last_update": "2017-01-30T18:39:05.212499Z", "content": "<p>Flicker Berat</p>"}, {"id": 58, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 112, "name": "castle"}], "_my_subclass": "webpage", "name": "Berry the castle", "slug": "berry-the-castle", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 15, "create_date": "2017-02-23T15:22:21.044556Z", "last_update": "2017-02-23T15:22:21.371782Z", "content": "<p>Crush crush crush<br></p>"}, {"id": 59, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 109, "name": "teste"}], "_my_subclass": "webpage", "name": "What you get", "slug": "what-you-get", "brief_description": "<p>To me</p>", "show_window": false, "all_students": true, "visible": true, "order": 16, "create_date": "2017-02-23T15:23:56.414396Z", "last_update": "2017-02-23T15:23:56.482582Z", "content": "<p>Let your heart with</p>"}, {"id": 66, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 116, "name": "Lord"}], "_my_subclass": "webpage", "name": "Last Stand", "slug": "last-stand", "brief_description": "<p>For the grace of the might of the Lord </p>", "show_window": false, "all_students": true, "visible": true, "order": 17, "create_date": "2017-02-24T20:31:26.650857Z", "last_update": "2017-02-24T20:31:26.778340Z", "content": "<p>Twenty Seven</p>"}, {"id": 68, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 118, "name": "calling"}], "_my_subclass": "webpage", "name": "Angels calling", "slug": "angels-calling", "brief_description": "<p>Falling</p>", "show_window": false, "all_students": true, "visible": true, "order": 18, "create_date": "2017-02-24T20:47:51.687147Z", "last_update": "2017-02-25T01:35:19.427849Z", "content": "<p>Your name</p>"}][{"id": 51, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 103, "name": "mirror"}, {"id": 104, "name": "to do"}], "_my_subclass": "ytvideo", "name": "System", "slug": "system", "brief_description": "<p>Gotta</p>", "show_window": true, "all_students": true, "visible": true, "order": 11, "create_date": "2017-02-01T21:03:21.123568Z", "last_update": "2017-02-02T23:08:32.570997Z", "url": "https://www.youtube.com/embed/qOrXWhmUbJ0"}][{"id": 41, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 93, "name": "last"}, {"id": 94, "name": "mistake"}], "_my_subclass": "filelink", "name": "Secret", "slug": "secret", "brief_description": "<p>Do we create a modern myth?</p>", "show_window": true, "all_students": true, "visible": false, "order": 3, "create_date": "2017-01-24T21:55:44.193797Z", "last_update": "2017-01-24T21:55:44.330406Z", "file_content": "/uploads/files/formulariobolsista.doc.docx"}, {"id": 40, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 91, "name": "end"}, {"id": 92, "name": "tonight"}], "_my_subclass": "filelink", "name": "Alive", "slug": "alive", "brief_description": "<p>Nothern lights</p><p>I'm still</p>", "show_window": true, "all_students": true, "visible": true, "order": 4, "create_date": "2017-01-24T21:52:58.028122Z", "last_update": "2017-01-30T18:33:25.804307Z", "file_content": "/uploads/files/index.html"}, {"id": 46, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 100, "name": "just"}, {"id": 101, "name": "game"}], "_my_subclass": "filelink", "name": "Personal", "slug": "personal", "brief_description": "<p>Pray All I can do</p><p>Taskani</p>", "show_window": false, "all_students": false, "visible": false, "order": 6, "create_date": "2017-01-25T02:21:38.618190Z", "last_update": "2017-01-25T02:24:26.061727Z", "file_content": "/uploads/files/jutificativa_voto.pdf"}, {"id": 73, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 125, "name": "Zafkiel"}], "_my_subclass": "filelink", "name": "Lies", "slug": "lies", "brief_description": "", "show_window": false, "all_students": false, "visible": true, "order": 20, "create_date": "2017-04-26T03:03:38.089353Z", "last_update": "2017-04-26T03:03:38.531148Z", "file_content": "/uploads/files/kurumi.png"}][{"id": 53, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 106, "name": "otherside"}], "_my_subclass": "link", "name": "Sorry", "slug": "sorry", "brief_description": "<p>Hellor</p>", "show_window": false, "all_students": true, "visible": true, "order": 12, "create_date": "2017-02-02T18:59:06.159653Z", "last_update": "2017-02-02T18:59:06.270167Z", "link_url": "https://www.youtube.com/embed/qOrXWhmUbJ0"}, {"id": 57, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 109, "name": "teste"}], "_my_subclass": "link", "name": "Unravel", "slug": "unravel", "brief_description": "<p>Co asseru</p>", "show_window": true, "all_students": true, "visible": true, "order": 14, "create_date": "2017-02-12T04:18:39.836818Z", "last_update": "2017-02-12T04:18:40.083226Z", "link_url": "http://stackoverflow.com/questions/813418/django-set-field-value-after-a-form-is-initialized"}][{"id": 56, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "_my_subclass": "pdffile", "name": "Legend", "slug": "legend", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 13, "create_date": "2017-02-09T18:29:12.935873Z", "last_update": "2017-02-09T18:29:13.410469Z", "file": "/uploads/files/egz_Ez4GoPW.pdf"}][{"id": 71, "topic": {"id": 32, "name": "Now Invisble", "slug": "now-invisble", "description": "<p>TIme to</p>", "repository": false, "visible": true, "order": 2, "create_date": "2017-01-17T18:44:24.976186Z", "last_update": "2017-03-08T01:28:52.845818Z"}, "tags": [{"id": 123, "name": "wastelands"}, {"id": 124, "name": "disapear"}], "item_goal": [{"id": 6, "description": "Wastelands", "ref_value": 50, "order": 1}, {"id": 7, "description": "Arms with no weapons", "ref_value": 55, "order": 2}], "_my_subclass": "goals", "name": "Future", "slug": "future", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 6, "create_date": "2017-03-06T20:11:11.156470Z", "last_update": "2017-03-08T01:29:03.155215Z", "presentation": "<p>Stands away</p>", "limit_submission_date": "2017-03-11T20:10:00Z"}, {"id": 70, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 121, "name": "megumin"}, {"id": 122, "name": "kurumin"}], "item_goal": [{"id": 3, "description": "Let me go", "ref_value": 57, "order": 1}, {"id": 4, "description": "Run away", "ref_value": 70, "order": 2}, {"id": 5, "description": "Explosiom", "ref_value": 89, "order": 3}], "_my_subclass": "goals", "name": "Snuff", "slug": "snuff", "brief_description": "<p>Deserve to have you</p>", "show_window": false, "all_students": true, "visible": true, "order": 19, "create_date": "2017-03-01T19:07:07.980858Z", "last_update": "2017-03-03T01:16:22.746523Z", "presentation": "<p>Resembles rage again...</p>", "limit_submission_date": "2017-03-02T21:05:00Z"}] | |
2 | 1 | \ No newline at end of file |
2 | +[{"id": 1, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 44, "name": "rvenge"}, {"id": 45, "name": "destruct"}], "pendencies_resource": [{"id": 1, "action": "create", "begin_date": "2017-01-21T23:35:00Z", "end_date": null, "limit_date": null}, {"id": 2, "action": "view", "begin_date": "2017-01-20T23:35:00Z", "end_date": "2017-01-31T23:35:00Z", "limit_date": null}], "_my_subclass": "webpage", "name": "Revenge", "slug": "revenge", "brief_description": "<p>Here Comes</p>", "show_window": false, "all_students": false, "visible": true, "order": 1, "create_date": "2017-01-20T22:42:16.126657Z", "last_update": "2017-01-30T18:39:30.100600Z", "content": "<p>Listen Dammit</p><p>I do know how to make it better thoug</p>"}, {"id": 14, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 58, "name": "survive"}, {"id": 59, "name": "brave"}], "pendencies_resource": [], "_my_subclass": "webpage", "name": "Care", "slug": "care", "brief_description": "<p>One last minute</p>", "show_window": true, "all_students": false, "visible": true, "order": 2, "create_date": "2017-01-23T17:59:10.053614Z", "last_update": "2017-01-24T21:53:17.119881Z", "content": "You don't really"}, {"id": 3, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 44, "name": "rvenge"}, {"id": 45, "name": "destruct"}], "pendencies_resource": [{"id": 5, "action": "create", "begin_date": "2017-01-24T23:35:00Z", "end_date": null, "limit_date": null}, {"id": 6, "action": "view", "begin_date": "2017-01-24T23:35:00Z", "end_date": "2017-01-31T23:35:00Z", "limit_date": null}], "_my_subclass": "webpage", "name": "Teste 2", "slug": "teste-2", "brief_description": "<p>Here Comes</p>", "show_window": true, "all_students": false, "visible": true, "order": 3, "create_date": "2017-01-23T17:17:28.416904Z", "last_update": "2017-01-24T21:53:17.131082Z", "content": "Listen Dammit"}, {"id": 4, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 46, "name": "tears"}, {"id": 47, "name": "rain"}], "pendencies_resource": [], "_my_subclass": "webpage", "name": "Have", "slug": "have", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 5, "create_date": "2017-01-23T17:31:58.957439Z", "last_update": "2017-01-24T21:53:17.155196Z", "content": "Haven't"}, {"id": 21, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 71, "name": "candle"}, {"id": 72, "name": "mass"}], "pendencies_resource": [{"id": 7, "action": "view", "begin_date": "2017-01-25T04:07:00Z", "end_date": "2017-02-02T04:07:00Z", "limit_date": null}], "_my_subclass": "webpage", "name": "Each small candle", "slug": "each-small-candle", "brief_description": "<p>Uhuh</p>", "show_window": false, "all_students": false, "visible": true, "order": 6, "create_date": "2017-01-24T03:16:17.180365Z", "last_update": "2017-01-24T21:53:17.164135Z", "content": "<p>Lights a corner of the dark</p>"}, {"id": 5, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 46, "name": "tears"}, {"id": 47, "name": "rain"}], "pendencies_resource": [], "_my_subclass": "webpage", "name": "Lose you", "slug": "lose-you", "brief_description": "<p>Save me</p>", "show_window": true, "all_students": false, "visible": true, "order": 7, "create_date": "2017-01-23T17:34:29.313661Z", "last_update": "2017-01-24T21:53:17.175261Z", "content": "Haven't <b>you heard <i>about the sirens <u>going down</u></i></b>"}, {"id": 16, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 62, "name": "sing"}, {"id": 63, "name": "loud"}], "pendencies_resource": [], "_my_subclass": "webpage", "name": "Sing", "slug": "sing", "brief_description": "<p>Talking about</p>", "show_window": false, "all_students": false, "visible": false, "order": 8, "create_date": "2017-01-23T22:10:39.437832Z", "last_update": "2017-01-24T21:53:17.197911Z", "content": "Sing sing"}, {"id": 49, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "pendencies_resource": [{"id": 22, "action": "view", "begin_date": "2017-01-31T19:38:00Z", "end_date": null, "limit_date": null}], "_my_subclass": "webpage", "name": "Testes", "slug": "testes", "brief_description": "<p>asd</p>", "show_window": false, "all_students": false, "visible": true, "order": 9, "create_date": "2017-01-30T18:38:25.741186Z", "last_update": "2017-01-30T18:38:25.878442Z", "content": "<p>COmon</p>"}, {"id": 50, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "pendencies_resource": [{"id": 23, "action": "view", "begin_date": "2017-02-03T19:38:00Z", "end_date": null, "limit_date": null}], "_my_subclass": "webpage", "name": "Yellow", "slug": "yellow", "brief_description": "<p>Vber</p>", "show_window": false, "all_students": false, "visible": true, "order": 10, "create_date": "2017-01-30T18:39:04.914450Z", "last_update": "2017-01-30T18:39:05.212499Z", "content": "<p>Flicker Berat</p>"}, {"id": 58, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 112, "name": "castle"}], "pendencies_resource": [{"id": 27, "action": "view", "begin_date": null, "end_date": null, "limit_date": null}], "_my_subclass": "webpage", "name": "Berry the castle", "slug": "berry-the-castle", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 15, "create_date": "2017-02-23T15:22:21.044556Z", "last_update": "2017-02-23T15:22:21.371782Z", "content": "<p>Crush crush crush<br></p>"}, {"id": 59, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 109, "name": "teste"}], "pendencies_resource": [{"id": 28, "action": "view", "begin_date": null, "end_date": null, "limit_date": null}], "_my_subclass": "webpage", "name": "What you get", "slug": "what-you-get", "brief_description": "<p>To me</p>", "show_window": false, "all_students": true, "visible": true, "order": 16, "create_date": "2017-02-23T15:23:56.414396Z", "last_update": "2017-02-23T15:23:56.482582Z", "content": "<p>Let your heart with</p>"}, {"id": 66, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 116, "name": "Lord"}], "pendencies_resource": [{"id": 30, "action": "view", "begin_date": null, "end_date": null, "limit_date": null}], "_my_subclass": "webpage", "name": "Last Stand", "slug": "last-stand", "brief_description": "<p>For the grace of the might of the Lord </p>", "show_window": false, "all_students": true, "visible": true, "order": 17, "create_date": "2017-02-24T20:31:26.650857Z", "last_update": "2017-02-24T20:31:26.778340Z", "content": "<p>Twenty Seven</p>"}, {"id": 68, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 118, "name": "calling"}], "pendencies_resource": [{"id": 31, "action": "view", "begin_date": "2017-02-28T23:01:00Z", "end_date": "2017-03-01T23:02:00Z", "limit_date": null}], "_my_subclass": "webpage", "name": "Angels calling", "slug": "angels-calling", "brief_description": "<p>Falling</p>", "show_window": false, "all_students": true, "visible": true, "order": 18, "create_date": "2017-02-24T20:47:51.687147Z", "last_update": "2017-02-25T01:35:19.427849Z", "content": "<p>Your name</p>"}][{"id": 51, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 103, "name": "mirror"}, {"id": 104, "name": "to do"}], "pendencies_resource": [{"id": 24, "action": "view", "begin_date": "2017-02-01T21:59:00Z", "end_date": null, "limit_date": null}], "_my_subclass": "ytvideo", "name": "System", "slug": "system", "brief_description": "<p>Gotta</p>", "show_window": true, "all_students": true, "visible": true, "order": 11, "create_date": "2017-02-01T21:03:21.123568Z", "last_update": "2017-02-02T23:08:32.570997Z", "url": "https://www.youtube.com/embed/qOrXWhmUbJ0"}][{"id": 40, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 91, "name": "end"}, {"id": 92, "name": "tonight"}], "pendencies_resource": [{"id": 21, "action": "view", "begin_date": "2017-01-31T19:33:00Z", "end_date": null, "limit_date": null}], "_my_subclass": "filelink", "name": "Alive", "slug": "alive", "brief_description": "<p>Nothern lights</p><p>I'm still</p>", "show_window": true, "all_students": true, "visible": true, "order": 4, "create_date": "2017-01-24T21:52:58.028122Z", "last_update": "2017-01-30T18:33:25.804307Z", "file_content": "/uploads/files/index.html"}, {"id": 73, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 125, "name": "Zafkiel"}], "pendencies_resource": [], "_my_subclass": "filelink", "name": "Lies", "slug": "lies", "brief_description": "", "show_window": false, "all_students": false, "visible": true, "order": 20, "create_date": "2017-04-26T03:03:38.089353Z", "last_update": "2017-04-26T03:03:38.531148Z", "file_content": "/uploads/files/kurumi.png"}][{"id": 53, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 106, "name": "otherside"}], "pendencies_resource": [], "_my_subclass": "link", "name": "Sorry", "slug": "sorry", "brief_description": "<p>Hellor</p>", "show_window": false, "all_students": true, "visible": true, "order": 12, "create_date": "2017-02-02T18:59:06.159653Z", "last_update": "2017-02-02T18:59:06.270167Z", "link_url": "https://www.youtube.com/embed/qOrXWhmUbJ0"}, {"id": 57, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 109, "name": "teste"}], "pendencies_resource": [], "_my_subclass": "link", "name": "Unravel", "slug": "unravel", "brief_description": "<p>Co asseru</p>", "show_window": true, "all_students": true, "visible": true, "order": 14, "create_date": "2017-02-12T04:18:39.836818Z", "last_update": "2017-02-12T04:18:40.083226Z", "link_url": "http://stackoverflow.com/questions/813418/django-set-field-value-after-a-form-is-initialized"}][{"id": 56, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 99, "name": ""}], "pendencies_resource": [], "_my_subclass": "pdffile", "name": "Legend", "slug": "legend", "brief_description": "", "show_window": false, "all_students": true, "visible": true, "order": 13, "create_date": "2017-02-09T18:29:12.935873Z", "last_update": "2017-02-09T18:29:13.410469Z", "file": "/uploads/files/egz_Ez4GoPW.pdf"}][{"id": 70, "topic": {"id": 30, "name": "Reposit\u00f3rio", "slug": "repositorio", "description": "<p>Testing</p>", "repository": true, "visible": false, "order": 1, "create_date": "2017-01-17T18:36:32.918370Z", "last_update": "2017-01-17T21:48:07.630468Z"}, "tags": [{"id": 121, "name": "megumin"}, {"id": 122, "name": "kurumin"}], "item_goal": [{"id": 3, "description": "Let me go", "ref_value": 57, "order": 1}, {"id": 4, "description": "Run away", "ref_value": 70, "order": 2}, {"id": 5, "description": "Explosiom", "ref_value": 89, "order": 3}], "pendencies_resource": [{"id": 33, "action": "view", "begin_date": "2017-03-01T19:06:00Z", "end_date": "2017-03-02T00:06:00Z", "limit_date": "2017-03-02T19:06:00Z"}], "_my_subclass": "goals", "name": "Snuff", "slug": "snuff", "brief_description": "<p>Deserve to have you</p>", "show_window": false, "all_students": true, "visible": true, "order": 19, "create_date": "2017-03-01T19:07:07.980858Z", "last_update": "2017-03-03T01:16:22.746523Z", "presentation": "<p>Resembles rage again...</p>", "limit_submission_date": "2017-03-02T21:05:00Z"}] | |
3 | 3 | \ No newline at end of file | ... | ... |
file_link/serializers.py
... | ... | @@ -2,13 +2,26 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import FileLink |
7 | 9 | |
8 | 10 | class SimpleFileLinkSerializer(serializers.ModelSerializer): |
9 | 11 | topic = TopicSerializer() |
10 | 12 | tags = TagSerializer(many = True) |
13 | + pendencies_resource = PendenciesSerializer(many = True) | |
11 | 14 | |
12 | 15 | class Meta: |
13 | 16 | model = FileLink |
14 | 17 | exclude = ('students', 'groups',) |
18 | + | |
19 | +class CompleteFileLinkSerializer(serializers.ModelSerializer): | |
20 | + topic = TopicSerializer() | |
21 | + tags = TagSerializer(many = True) | |
22 | + pendencies_resource = PendenciesSerializer(many = True) | |
23 | + groups = StudentsGroupSerializer(many = True) | |
24 | + | |
25 | + class Meta: | |
26 | + model = FileLink | |
27 | + fields = '__all__' | ... | ... |
goals/serializers.py
... | ... | @@ -2,6 +2,8 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import Goals, GoalItem |
7 | 9 | |
... | ... | @@ -14,7 +16,18 @@ class SimpleGoalSerializer(serializers.ModelSerializer): |
14 | 16 | topic = TopicSerializer() |
15 | 17 | tags = TagSerializer(many = True) |
16 | 18 | item_goal = GoalItemSerializer(many = True) |
19 | + pendencies_resource = PendenciesSerializer(many = True) | |
17 | 20 | |
18 | 21 | class Meta: |
19 | 22 | model = Goals |
20 | 23 | exclude = ('students', 'groups',) |
24 | + | |
25 | +class CompleteGoalSerializer(serializers.ModelSerializer): | |
26 | + topic = TopicSerializer() | |
27 | + tags = TagSerializer(many = True) | |
28 | + pendencies_resource = PendenciesSerializer(many = True) | |
29 | + groups = StudentsGroupSerializer(many = True) | |
30 | + | |
31 | + class Meta: | |
32 | + model = Goals | |
33 | + fields = '__all__' | |
21 | 34 | \ No newline at end of file | ... | ... |
links/serializers.py
... | ... | @@ -2,13 +2,26 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import Link |
7 | 9 | |
8 | 10 | class SimpleLinkSerializer(serializers.ModelSerializer): |
9 | 11 | topic = TopicSerializer() |
10 | 12 | tags = TagSerializer(many = True) |
13 | + pendencies_resource = PendenciesSerializer(many = True) | |
11 | 14 | |
12 | 15 | class Meta: |
13 | 16 | model = Link |
14 | 17 | exclude = ('students', 'groups',) |
18 | + | |
19 | +class CompleteLinkSerializer(serializers.ModelSerializer): | |
20 | + topic = TopicSerializer() | |
21 | + tags = TagSerializer(many = True) | |
22 | + pendencies_resource = PendenciesSerializer(many = True) | |
23 | + groups = StudentsGroupSerializer(many = True) | |
24 | + | |
25 | + class Meta: | |
26 | + model = Link | |
27 | + fields = '__all__' | |
15 | 28 | \ No newline at end of file | ... | ... |
pdf_file/serializers.py
... | ... | @@ -2,13 +2,26 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import PDFFile |
7 | 9 | |
8 | 10 | class SimplePDFFileSerializer(serializers.ModelSerializer): |
9 | 11 | topic = TopicSerializer() |
10 | 12 | tags = TagSerializer(many = True) |
13 | + pendencies_resource = PendenciesSerializer(many = True) | |
11 | 14 | |
12 | 15 | class Meta: |
13 | 16 | model = PDFFile |
14 | 17 | exclude = ('students', 'groups',) |
18 | + | |
19 | +class CompletePDFFileSerializer(serializers.ModelSerializer): | |
20 | + topic = TopicSerializer() | |
21 | + tags = TagSerializer(many = True) | |
22 | + pendencies_resource = PendenciesSerializer(many = True) | |
23 | + groups = StudentsGroupSerializer(many = True) | |
24 | + | |
25 | + class Meta: | |
26 | + model = PDFFile | |
27 | + fields = '__all__' | |
15 | 28 | \ No newline at end of file | ... | ... |
pdf_file/templates/pdf_file/relatorios.html
... | ... | @@ -270,19 +270,19 @@ |
270 | 270 | ] |
271 | 271 | }); |
272 | 272 | $("#title-table").text(search.length + " {% trans 'record(s)' %}"); |
273 | - function putpagination(data = json_history["data"]){ | |
273 | + function putpagination(data = json_history["data"], load_histoty = true){ | |
274 | 274 | var len = Math.ceil(data.length / 20); |
275 | 275 | $(".pagination").empty(); |
276 | 276 | $(".pagination").append('<li class="disabled"><span>«</span></li>'); |
277 | 277 | $(".pagination").append('<li id="1" class="active">\ |
278 | - <a href="javascript:void(0);" onclick="return clickPagination(1);">1</a>\ | |
278 | + <a href="javascript:void(0);" onclick="return clickPagination(1, '+ load_histoty +');">1</a>\ | |
279 | 279 | </li>'); |
280 | 280 | for (var i = 2; i <= len;i++){ |
281 | 281 | $(".pagination").append('<li id="' + i + '">\ |
282 | - <a href="javascript:void(0);" onclick="return clickPagination(' + i +');">' + i + '</a>\ | |
282 | + <a href="javascript:void(0);" onclick="return clickPagination(' + i +', ' + load_histoty + ');">' + i + '</a>\ | |
283 | 283 | </li>'); |
284 | 284 | } |
285 | - if (len > 1) $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(2);"><span>»</span></a></li>'); | |
285 | + if (len > 1) $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(2, '+ load_histoty +');"><span>»</span></a></li>'); | |
286 | 286 | else $(".pagination").append('<li class="disabled"><span>»</span></li>'); |
287 | 287 | }; |
288 | 288 | putpagination(); |
... | ... | @@ -355,7 +355,7 @@ |
355 | 355 | drawTable(column_history,pagination(search,1),true,3); |
356 | 356 | } |
357 | 357 | $("#title-table").text(search.length + " {% trans 'record(s)' %}"); |
358 | - putpagination(search); | |
358 | + putpagination(search,load_histoty); | |
359 | 359 | } |
360 | 360 | |
361 | 361 | function pagination(data,pag){ |
... | ... | @@ -376,10 +376,10 @@ |
376 | 376 | } |
377 | 377 | |
378 | 378 | if (pag < Math.ceil(search.length / 20)) |
379 | - $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag + 1) + ');"><span>»</span></a></li>'); | |
379 | + $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag + 1) + ', '+ load_histoty +');"><span>»</span></a></li>'); | |
380 | 380 | else $(".pagination").append('<li class="disabled"><span>»</span></li>'); |
381 | 381 | if (pag > 1) |
382 | - $(".pagination").prepend('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag - 1) + ');"><span>«</span></a></li>'); | |
382 | + $(".pagination").prepend('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag - 1) + ', '+ load_histoty +');"><span>«</span></a></li>'); | |
383 | 383 | else $(".pagination").prepend('<li class="disabled"><span>«</span></li>'); |
384 | 384 | $(".active").removeClass("active"); |
385 | 385 | $("#" + pag).addClass("active"); | ... | ... |
pdf_file/views.py
... | ... | @@ -154,6 +154,9 @@ class PDFFileCreateView(LoginRequiredMixin, LogMixin , generic.CreateView): |
154 | 154 | if not self.object.topic.visible and not self.object.topic.repository: |
155 | 155 | self.object.visible = False |
156 | 156 | |
157 | + if form.cleaned_data["all_students"]: | |
158 | + self.object.students.add(*self.object.topic.subject.students.all()) | |
159 | + | |
157 | 160 | self.object.save() |
158 | 161 | |
159 | 162 | pend_form = pendencies_form.save(commit = False) | ... | ... |
subjects/templates/subjects/backup.html
... | ... | @@ -67,7 +67,7 @@ |
67 | 67 | <h5>{% trans "Please select below the topics and resources which you want to backup:" %}</h5> |
68 | 68 | |
69 | 69 | <div class="backup_container"> |
70 | - <form id="bkp_form" method="post" action="{% url 'subjects:do_backup' %}" enctype="multipart/form-data"> | |
70 | + <form id="bkp_form" method="post" action="{% url 'subjects:do_backup' subject.slug %}" enctype="multipart/form-data"> | |
71 | 71 | {% csrf_token %} |
72 | 72 | |
73 | 73 | {% for topic in topics %} |
... | ... | @@ -90,6 +90,15 @@ |
90 | 90 | </div> |
91 | 91 | {% endfor %} |
92 | 92 | |
93 | + {% if request.user.is_staff %} | |
94 | + <br clear="all" /> | |
95 | + <div class="checkbox backup_item" style="margin-left: 0"> | |
96 | + <label> | |
97 | + <input type="checkbox" name="participants" /> {% trans 'Include participants data.' %} | |
98 | + </label> | |
99 | + </div> | |
100 | + {% endif %} | |
101 | + | |
93 | 102 | <div class="row text-center"> |
94 | 103 | <input type="submit" value="{% trans 'Backup' %}" class="btn btn-success btn-raised" /> |
95 | 104 | </div> | ... | ... |
subjects/urls.py
... | ... | @@ -10,7 +10,7 @@ urlpatterns = [ |
10 | 10 | url(r'^update/(?P<slug>[\w_-]+)/$', views.SubjectUpdateView.as_view(), name='update'), |
11 | 11 | url(r'^delete/(?P<slug>[\w_-]+)/$', views.SubjectDeleteView.as_view(), name='delete'), |
12 | 12 | url(r'^backup/(?P<slug>[\w_-]+)/$', views.Backup.as_view(), name='backup'), |
13 | - url(r'^do_backup/$', views.realize_backup, name='do_backup'), | |
13 | + url(r'^do_backup/(?P<subject>[\w_-]+)/$', views.realize_backup, name='do_backup'), | |
14 | 14 | url(r'^view/(?P<slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='view'), |
15 | 15 | url(r'^view/(?P<slug>[\w_-]+)/(?P<topic_slug>[\w_-]+)/$', views.SubjectDetailView.as_view(), name='topic_view'), |
16 | 16 | url(r'^subscribe/(?P<slug>[\w_-]+)/$', views.SubjectSubscribeView.as_view(), name='subscribe'), | ... | ... |
subjects/views.py
... | ... | @@ -41,17 +41,18 @@ from itertools import chain |
41 | 41 | from django.core import serializers |
42 | 42 | from rest_framework.renderers import JSONRenderer |
43 | 43 | |
44 | -from file_link.serializers import SimpleFileLinkSerializer | |
44 | +from users.serializers import UserSerializer | |
45 | +from file_link.serializers import SimpleFileLinkSerializer, CompleteFileLinkSerializer | |
45 | 46 | from file_link.models import FileLink |
46 | -from goals.serializers import SimpleGoalSerializer | |
47 | +from goals.serializers import SimpleGoalSerializer, CompleteGoalSerializer | |
47 | 48 | from goals.models import Goals |
48 | -from links.serializers import SimpleLinkSerializer | |
49 | +from links.serializers import SimpleLinkSerializer, CompleteLinkSerializer | |
49 | 50 | from links.models import Link |
50 | -from pdf_file.serializers import SimplePDFFileSerializer | |
51 | +from pdf_file.serializers import SimplePDFFileSerializer, CompletePDFFileSerializer | |
51 | 52 | from pdf_file.models import PDFFile |
52 | -from youtube_video.serializers import SimpleYTVideoSerializer | |
53 | +from youtube_video.serializers import SimpleYTVideoSerializer, CompleteYTVideoSerializer | |
53 | 54 | from youtube_video.models import YTVideo |
54 | -from webpage.serializers import SimpleWebpageSerializer | |
55 | +from webpage.serializers import SimpleWebpageSerializer, CompleteWebpageSerializer | |
55 | 56 | from webpage.models import Webpage |
56 | 57 | |
57 | 58 | from amadeus.permissions import has_category_permissions, has_subject_permissions, has_subject_view_permissions, has_resource_permissions |
... | ... | @@ -748,8 +749,9 @@ class Backup(LoginRequiredMixin, ListView): |
748 | 749 | return context |
749 | 750 | |
750 | 751 | @login_required |
751 | -def realize_backup(request): | |
752 | +def realize_backup(request, subject): | |
752 | 753 | resources_ids = request.POST.getlist("resource[]") |
754 | + participants = request.POST.get('participants', False) | |
753 | 755 | |
754 | 756 | resource_files_subdir = "files" |
755 | 757 | zip_filename = "backup.zip" |
... | ... | @@ -758,37 +760,59 @@ def realize_backup(request): |
758 | 760 | |
759 | 761 | zf = zipfile.ZipFile(s, "w", compression = zipfile.ZIP_DEFLATED) |
760 | 762 | |
761 | - resources = Resource.objects.filter(id__in = resources_ids) | |
763 | + webpages = Webpage.objects.filter(id__in = resources_ids) | |
764 | + ytvideos = YTVideo.objects.filter(id__in = resources_ids) | |
765 | + filelinks = FileLink.objects.filter(id__in = resources_ids) | |
766 | + links = Link.objects.filter(id__in = resources_ids) | |
767 | + pdffiles = PDFFile.objects.filter(id__in = resources_ids) | |
768 | + goals = Goals.objects.filter(id__in = resources_ids) | |
762 | 769 | |
763 | - for resource in resources: | |
764 | - if resource._my_subclass == "filelink": | |
765 | - fdir, fname = os.path.split(resource.filelink.file_content.path) | |
770 | + | |
771 | + for filelink in filelinks: | |
772 | + if os.path.exists(filelink.file_content.path): | |
773 | + fdir, fname = os.path.split(filelink.file_content.path) | |
766 | 774 | zip_path = os.path.join(resource_files_subdir, fname) |
767 | 775 | |
768 | 776 | # Add file, at correct path |
769 | - zf.write(resource.filelink.file_content.path, zip_path) | |
770 | - elif resource._my_subclass == "pdffile": | |
771 | - fdir, fname = os.path.split(resource.pdffile.file.path) | |
777 | + zf.write(filelink.file_content.path, zip_path) | |
778 | + | |
779 | + for pdffile in pdffiles: | |
780 | + if os.path.exists(pdffile.file.path): | |
781 | + fdir, fname = os.path.split(pdffile.file.path) | |
772 | 782 | zip_path = os.path.join(resource_files_subdir, fname) |
773 | 783 | |
774 | 784 | # Add file, at correct path |
775 | - zf.write(resource.pdffile.file.path, zip_path) | |
776 | - | |
777 | - webpages = Webpage.objects.filter(id__in = resources_ids) | |
778 | - ytvideos = YTVideo.objects.filter(id__in = resources_ids) | |
779 | - filelinks = FileLink.objects.filter(id__in = resources_ids) | |
780 | - links = Link.objects.filter(id__in = resources_ids) | |
781 | - pdffiles = PDFFile.objects.filter(id__in = resources_ids) | |
782 | - goals = Goals.objects.filter(id__in = resources_ids) | |
785 | + zf.write(pdffile.file.path, zip_path) | |
783 | 786 | |
784 | 787 | file = open("backup.json", "w") |
785 | 788 | |
786 | - serializer_w = SimpleWebpageSerializer(webpages, many = True) | |
787 | - serializer_y = SimpleYTVideoSerializer(ytvideos, many = True) | |
788 | - serializer_f = SimpleFileLinkSerializer(filelinks, many = True) | |
789 | - serializer_l = SimpleLinkSerializer(links, many = True) | |
790 | - serializer_p = SimplePDFFileSerializer(pdffiles, many = True) | |
791 | - serializer_g = SimpleGoalSerializer(goals, many = True) | |
789 | + if participants: | |
790 | + participants = User.objects.filter(subject_student__slug = subject) | |
791 | + | |
792 | + for user in participants: | |
793 | + if os.path.exists(user.image.path): | |
794 | + fdir, fname = os.path.split(user.image.path) | |
795 | + zip_path = os.path.join('users', fname) | |
796 | + | |
797 | + zf.write(user.image.path, zip_path) | |
798 | + | |
799 | + serializer_u = UserSerializer(participants, many = True) | |
800 | + | |
801 | + json.dump(serializer_u.data, file) | |
802 | + | |
803 | + serializer_w = CompleteWebpageSerializer(webpages, many = True) | |
804 | + serializer_y = CompleteYTVideoSerializer(ytvideos, many = True) | |
805 | + serializer_f = CompleteFileLinkSerializer(filelinks, many = True) | |
806 | + serializer_l = CompleteLinkSerializer(links, many = True) | |
807 | + serializer_p = CompletePDFFileSerializer(pdffiles, many = True) | |
808 | + serializer_g = CompleteGoalSerializer(goals, many = True) | |
809 | + else: | |
810 | + serializer_w = SimpleWebpageSerializer(webpages, many = True) | |
811 | + serializer_y = SimpleYTVideoSerializer(ytvideos, many = True) | |
812 | + serializer_f = SimpleFileLinkSerializer(filelinks, many = True) | |
813 | + serializer_l = SimpleLinkSerializer(links, many = True) | |
814 | + serializer_p = SimplePDFFileSerializer(pdffiles, many = True) | |
815 | + serializer_g = SimpleGoalSerializer(goals, many = True) | |
792 | 816 | |
793 | 817 | json.dump(serializer_w.data, file) |
794 | 818 | json.dump(serializer_y.data, file) | ... | ... |
users/serializers.py
webpage/serializers.py
... | ... | @@ -2,13 +2,26 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import Webpage |
7 | 9 | |
8 | 10 | class SimpleWebpageSerializer(serializers.ModelSerializer): |
9 | 11 | topic = TopicSerializer() |
10 | 12 | tags = TagSerializer(many = True) |
13 | + pendencies_resource = PendenciesSerializer(many = True) | |
11 | 14 | |
12 | 15 | class Meta: |
13 | 16 | model = Webpage |
14 | 17 | exclude = ('students', 'groups',) |
18 | + | |
19 | +class CompleteWebpageSerializer(serializers.ModelSerializer): | |
20 | + topic = TopicSerializer() | |
21 | + tags = TagSerializer(many = True) | |
22 | + pendencies_resource = PendenciesSerializer(many = True) | |
23 | + groups = StudentsGroupSerializer(many = True) | |
24 | + | |
25 | + class Meta: | |
26 | + model = Webpage | |
27 | + fields = '__all__' | |
15 | 28 | \ No newline at end of file | ... | ... |
webpage/templates/webpages/relatorios.html
... | ... | @@ -270,19 +270,19 @@ |
270 | 270 | ] |
271 | 271 | }); |
272 | 272 | $("#title-table").text(search.length + " {% trans 'record(s)' %}"); |
273 | - function putpagination(data = json_history["data"]){ | |
273 | + function putpagination(data = json_history["data"], load_histoty = true){ | |
274 | 274 | var len = Math.ceil(data.length / 20); |
275 | 275 | $(".pagination").empty(); |
276 | 276 | $(".pagination").append('<li class="disabled"><span>«</span></li>'); |
277 | 277 | $(".pagination").append('<li id="1" class="active">\ |
278 | - <a href="javascript:void(0);" onclick="return clickPagination(1);">1</a>\ | |
278 | + <a href="javascript:void(0);" onclick="return clickPagination(1, '+ load_histoty +');">1</a>\ | |
279 | 279 | </li>'); |
280 | 280 | for (var i = 2; i <= len;i++){ |
281 | 281 | $(".pagination").append('<li id="' + i + '">\ |
282 | - <a href="javascript:void(0);" onclick="return clickPagination(' + i +');">' + i + '</a>\ | |
282 | + <a href="javascript:void(0);" onclick="return clickPagination(' + i +', ' + load_histoty + ');">' + i + '</a>\ | |
283 | 283 | </li>'); |
284 | 284 | } |
285 | - if (len > 1) $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(2);"><span>»</span></a></li>'); | |
285 | + if (len > 1) $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(2, '+ load_histoty +');"><span>»</span></a></li>'); | |
286 | 286 | else $(".pagination").append('<li class="disabled"><span>»</span></li>'); |
287 | 287 | }; |
288 | 288 | putpagination(); |
... | ... | @@ -355,7 +355,7 @@ |
355 | 355 | drawTable(column_history,pagination(search,1),true,3); |
356 | 356 | } |
357 | 357 | $("#title-table").text(search.length + " {% trans 'record(s)' %}"); |
358 | - putpagination(search); | |
358 | + putpagination(search,load_histoty); | |
359 | 359 | } |
360 | 360 | |
361 | 361 | function pagination(data,pag){ |
... | ... | @@ -377,10 +377,10 @@ |
377 | 377 | } |
378 | 378 | |
379 | 379 | if (pag < Math.ceil(search.length / 20)) |
380 | - $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag + 1) + ');"><span>»</span></a></li>'); | |
380 | + $(".pagination").append('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag + 1) + ', '+ load_histoty +');"><span>»</span></a></li>'); | |
381 | 381 | else $(".pagination").append('<li class="disabled"><span>»</span></li>'); |
382 | 382 | if (pag > 1) |
383 | - $(".pagination").prepend('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag - 1) + ');"><span>«</span></a></li>'); | |
383 | + $(".pagination").prepend('<li><a href="javascript:void(0);" onclick="return clickPagination(' + (pag - 1) + ', '+ load_histoty +');"><span>«</span></a></li>'); | |
384 | 384 | else $(".pagination").prepend('<li class="disabled"><span>«</span></li>'); |
385 | 385 | $(".active").removeClass("active"); |
386 | 386 | $("#" + pag).addClass("active"); | ... | ... |
webpage/views.py
... | ... | @@ -116,131 +116,133 @@ class InsideView(LoginRequiredMixin, LogMixin, generic.DetailView): |
116 | 116 | return context |
117 | 117 | |
118 | 118 | class CreateView(LoginRequiredMixin, LogMixin, generic.edit.CreateView): |
119 | - log_component = 'resources' | |
120 | - log_action = 'create' | |
121 | - log_resource = 'webpage' | |
122 | - log_context = {} | |
119 | + log_component = 'resources' | |
120 | + log_action = 'create' | |
121 | + log_resource = 'webpage' | |
122 | + log_context = {} | |
123 | 123 | |
124 | - login_url = reverse_lazy("users:login") | |
125 | - redirect_field_name = 'next' | |
124 | + login_url = reverse_lazy("users:login") | |
125 | + redirect_field_name = 'next' | |
126 | 126 | |
127 | - template_name = 'webpages/create.html' | |
128 | - form_class = WebpageForm | |
127 | + template_name = 'webpages/create.html' | |
128 | + form_class = WebpageForm | |
129 | 129 | |
130 | - def dispatch(self, request, *args, **kwargs): | |
131 | - slug = self.kwargs.get('slug', '') | |
132 | - topic = get_object_or_404(Topic, slug = slug) | |
130 | + def dispatch(self, request, *args, **kwargs): | |
131 | + slug = self.kwargs.get('slug', '') | |
132 | + topic = get_object_or_404(Topic, slug = slug) | |
133 | 133 | |
134 | - if not has_subject_permissions(request.user, topic.subject): | |
135 | - return redirect(reverse_lazy('subjects:home')) | |
134 | + if not has_subject_permissions(request.user, topic.subject): | |
135 | + return redirect(reverse_lazy('subjects:home')) | |
136 | 136 | |
137 | - return super(CreateView, self).dispatch(request, *args, **kwargs) | |
137 | + return super(CreateView, self).dispatch(request, *args, **kwargs) | |
138 | 138 | |
139 | - def get(self, request, *args, **kwargs): | |
140 | - self.object = None | |
139 | + def get(self, request, *args, **kwargs): | |
140 | + self.object = None | |
141 | 141 | |
142 | - form_class = self.get_form_class() | |
143 | - form = self.get_form(form_class) | |
142 | + form_class = self.get_form_class() | |
143 | + form = self.get_form(form_class) | |
144 | 144 | |
145 | - slug = self.kwargs.get('slug', '') | |
146 | - topic = get_object_or_404(Topic, slug = slug) | |
145 | + slug = self.kwargs.get('slug', '') | |
146 | + topic = get_object_or_404(Topic, slug = slug) | |
147 | 147 | |
148 | - pendencies_form = PendenciesForm(initial = {'subject': topic.subject.id, 'actions': [("", "-------"),("view", _("Visualize"))]}) | |
148 | + pendencies_form = PendenciesForm(initial = {'subject': topic.subject.id, 'actions': [("", "-------"),("view", _("Visualize"))]}) | |
149 | 149 | |
150 | - return self.render_to_response(self.get_context_data(form = form, pendencies_form = pendencies_form)) | |
150 | + return self.render_to_response(self.get_context_data(form = form, pendencies_form = pendencies_form)) | |
151 | 151 | |
152 | - def post(self, request, *args, **kwargs): | |
153 | - self.object = None | |
152 | + def post(self, request, *args, **kwargs): | |
153 | + self.object = None | |
154 | 154 | |
155 | - form_class = self.get_form_class() | |
156 | - form = self.get_form(form_class) | |
155 | + form_class = self.get_form_class() | |
156 | + form = self.get_form(form_class) | |
157 | 157 | |
158 | - slug = self.kwargs.get('slug', '') | |
159 | - topic = get_object_or_404(Topic, slug = slug) | |
158 | + slug = self.kwargs.get('slug', '') | |
159 | + topic = get_object_or_404(Topic, slug = slug) | |
160 | 160 | |
161 | - pendencies_form = PendenciesForm(self.request.POST, initial = {'subject': topic.subject.id, 'actions': [("", "-------"),("view", _("Visualize"))]}) | |
161 | + pendencies_form = PendenciesForm(self.request.POST, initial = {'subject': topic.subject.id, 'actions': [("", "-------"),("view", _("Visualize"))]}) | |
162 | 162 | |
163 | - if (form.is_valid() and pendencies_form.is_valid()): | |
164 | - return self.form_valid(form, pendencies_form) | |
165 | - else: | |
166 | - return self.form_invalid(form, pendencies_form) | |
163 | + if (form.is_valid() and pendencies_form.is_valid()): | |
164 | + return self.form_valid(form, pendencies_form) | |
165 | + else: | |
166 | + return self.form_invalid(form, pendencies_form) | |
167 | 167 | |
168 | - def get_initial(self): | |
169 | - initial = super(CreateView, self).get_initial() | |
168 | + def get_initial(self): | |
169 | + initial = super(CreateView, self).get_initial() | |
170 | 170 | |
171 | - slug = self.kwargs.get('slug', '') | |
171 | + slug = self.kwargs.get('slug', '') | |
172 | 172 | |
173 | - topic = get_object_or_404(Topic, slug = slug) | |
174 | - initial['subject'] = topic.subject | |
173 | + topic = get_object_or_404(Topic, slug = slug) | |
174 | + initial['subject'] = topic.subject | |
175 | 175 | |
176 | - return initial | |
176 | + return initial | |
177 | 177 | |
178 | - def form_invalid(self, form, pendencies_form): | |
179 | - return self.render_to_response(self.get_context_data(form = form, pendencies_form = pendencies_form)) | |
178 | + def form_invalid(self, form, pendencies_form): | |
179 | + return self.render_to_response(self.get_context_data(form = form, pendencies_form = pendencies_form)) | |
180 | 180 | |
181 | - def form_valid(self, form, pendencies_form): | |
182 | - self.object = form.save(commit = False) | |
181 | + def form_valid(self, form, pendencies_form): | |
182 | + self.object = form.save(commit = False) | |
183 | + slug = self.kwargs.get('slug', '') | |
184 | + topic = get_object_or_404(Topic, slug = slug) | |
183 | 185 | |
184 | - slug = self.kwargs.get('slug', '') | |
185 | - topic = get_object_or_404(Topic, slug = slug) | |
186 | + self.object.topic = topic | |
187 | + self.object.order = topic.resource_topic.count() + 1 | |
186 | 188 | |
187 | - self.object.topic = topic | |
188 | - self.object.order = topic.resource_topic.count() + 1 | |
189 | + if not self.object.topic.visible and not self.object.topic.repository: | |
190 | + self.object.visible = False | |
189 | 191 | |
190 | - if not self.object.topic.visible and not self.object.topic.repository: | |
191 | - self.object.visible = False | |
192 | 192 | |
193 | - self.object.save() | |
193 | + if form.cleaned_data["all_students"]: | |
194 | + self.object.students.add(*self.object.topic.subject.students.all()) | |
195 | + self.object.save() | |
194 | 196 | |
195 | - pend_form = pendencies_form.save(commit = False) | |
196 | - pend_form.resource = self.object | |
197 | + pend_form = pendencies_form.save(commit = False) | |
198 | + pend_form.resource = self.object | |
197 | 199 | |
198 | - if not pend_form.action == "": | |
199 | - pend_form.save() | |
200 | + if not pend_form.action == "": | |
201 | + pend_form.save() | |
200 | 202 | |
201 | - self.log_context['category_id'] = self.object.topic.subject.category.id | |
202 | - self.log_context['category_name'] = self.object.topic.subject.category.name | |
203 | - self.log_context['category_slug'] = self.object.topic.subject.category.slug | |
204 | - self.log_context['subject_id'] = self.object.topic.subject.id | |
205 | - self.log_context['subject_name'] = self.object.topic.subject.name | |
206 | - self.log_context['subject_slug'] = self.object.topic.subject.slug | |
207 | - self.log_context['topic_id'] = self.object.topic.id | |
208 | - self.log_context['topic_name'] = self.object.topic.name | |
209 | - self.log_context['topic_slug'] = self.object.topic.slug | |
210 | - self.log_context['webpage_id'] = self.object.id | |
211 | - self.log_context['webpage_name'] = self.object.name | |
212 | - self.log_context['webpage_slug'] = self.object.slug | |
203 | + self.log_context['category_id'] = self.object.topic.subject.category.id | |
204 | + self.log_context['category_name'] = self.object.topic.subject.category.name | |
205 | + self.log_context['category_slug'] = self.object.topic.subject.category.slug | |
206 | + self.log_context['subject_id'] = self.object.topic.subject.id | |
207 | + self.log_context['subject_name'] = self.object.topic.subject.name | |
208 | + self.log_context['subject_slug'] = self.object.topic.subject.slug | |
209 | + self.log_context['topic_id'] = self.object.topic.id | |
210 | + self.log_context['topic_name'] = self.object.topic.name | |
211 | + self.log_context['topic_slug'] = self.object.topic.slug | |
212 | + self.log_context['webpage_id'] = self.object.id | |
213 | + self.log_context['webpage_name'] = self.object.name | |
214 | + self.log_context['webpage_slug'] = self.object.slug | |
213 | 215 | |
214 | - super(CreateView, self).createLog(self.request.user, self.log_component, self.log_action, self.log_resource, self.log_context) | |
216 | + super(CreateView, self).createLog(self.request.user, self.log_component, self.log_action, self.log_resource, self.log_context) | |
215 | 217 | |
216 | - return redirect(self.get_success_url()) | |
218 | + return redirect(self.get_success_url()) | |
217 | 219 | |
218 | - def get_context_data(self, **kwargs): | |
219 | - context = super(CreateView, self).get_context_data(**kwargs) | |
220 | + def get_context_data(self, **kwargs): | |
221 | + context = super(CreateView, self).get_context_data(**kwargs) | |
220 | 222 | |
221 | - context['title'] = _('Create Webpage') | |
223 | + context['title'] = _('Create Webpage') | |
222 | 224 | |
223 | - slug = self.kwargs.get('slug', '') | |
224 | - topic = get_object_or_404(Topic, slug = slug) | |
225 | + slug = self.kwargs.get('slug', '') | |
226 | + topic = get_object_or_404(Topic, slug = slug) | |
225 | 227 | |
226 | - context['topic'] = topic | |
227 | - context['subject'] = topic.subject | |
228 | + context['topic'] = topic | |
229 | + context['subject'] = topic.subject | |
228 | 230 | |
229 | - return context | |
231 | + return context | |
230 | 232 | |
231 | - def get_success_url(self): | |
232 | - messages.success(self.request, _('The Webpage "%s" was added to the Topic "%s" of the virtual environment "%s" successfully!')%(self.object.name, self.object.topic.name, self.object.topic.subject.name)) | |
233 | + def get_success_url(self): | |
234 | + messages.success(self.request, _('The Webpage "%s" was added to the Topic "%s" of the virtual environment "%s" successfully!')%(self.object.name, self.object.topic.name, self.object.topic.subject.name)) | |
233 | 235 | |
234 | - success_url = reverse_lazy('webpages:view', kwargs = {'slug': self.object.slug}) | |
236 | + success_url = reverse_lazy('webpages:view', kwargs = {'slug': self.object.slug}) | |
235 | 237 | |
236 | - if self.object.show_window: | |
237 | - self.request.session['resources'] = {} | |
238 | - self.request.session['resources']['new_page'] = True | |
239 | - self.request.session['resources']['new_page_url'] = reverse('webpages:window_view', kwargs = {'slug': self.object.slug}) | |
238 | + if self.object.show_window: | |
239 | + self.request.session['resources'] = {} | |
240 | + self.request.session['resources']['new_page'] = True | |
241 | + self.request.session['resources']['new_page_url'] = reverse('webpages:window_view', kwargs = {'slug': self.object.slug}) | |
240 | 242 | |
241 | - success_url = reverse_lazy('subjects:view', kwargs = {'slug': self.object.topic.subject.slug}) | |
243 | + success_url = reverse_lazy('subjects:view', kwargs = {'slug': self.object.topic.subject.slug}) | |
242 | 244 | |
243 | - return success_url | |
245 | + return success_url | |
244 | 246 | |
245 | 247 | class UpdateView(LoginRequiredMixin, LogMixin, generic.UpdateView): |
246 | 248 | log_component = 'resources' | ... | ... |
youtube_video/serializers.py
... | ... | @@ -2,13 +2,26 @@ from rest_framework import serializers |
2 | 2 | |
3 | 3 | from subjects.serializers import TagSerializer |
4 | 4 | from topics.serializers import TopicSerializer |
5 | +from pendencies.serializers import PendenciesSerializer | |
6 | +from students_group.serializers import StudentsGroupSerializer | |
5 | 7 | |
6 | 8 | from .models import YTVideo |
7 | 9 | |
8 | 10 | class SimpleYTVideoSerializer(serializers.ModelSerializer): |
9 | 11 | topic = TopicSerializer() |
10 | 12 | tags = TagSerializer(many = True) |
13 | + pendencies_resource = PendenciesSerializer(many = True) | |
11 | 14 | |
12 | 15 | class Meta: |
13 | 16 | model = YTVideo |
14 | 17 | exclude = ('students', 'groups',) |
18 | + | |
19 | +class CompleteYTVideoSerializer(serializers.ModelSerializer): | |
20 | + topic = TopicSerializer() | |
21 | + tags = TagSerializer(many = True) | |
22 | + pendencies_resource = PendenciesSerializer(many = True) | |
23 | + groups = StudentsGroupSerializer(many = True) | |
24 | + | |
25 | + class Meta: | |
26 | + model = YTVideo | |
27 | + fields = '__all__' | |
15 | 28 | \ No newline at end of file | ... | ... |