@@ -42,86 +42,4 @@ def delete(self, activity):
4242
4343 def list (self ):
4444 return self .activities .all ()
45-
46- def init_default (self ):
47- activities_collection = self .activities .search (self .query .stock == True )
48- if len (activities_collection ) == 0 :
49- f = open ("activity_default.json" , "r" )
50- activity = json .load (f )
51- """
52- activity = {
53- "name": "default",
54- "default": True,
55- "stock": True,
56- "codeFont": 'ubuntumono',
57- "description": None,
58- "drawerEnabled": True,
59- "exec": {
60- "camera": True,
61- "log": True,
62- },
63- "fontSize": 'Medio',
64- "showName": True,
65- "maxBlocks": None,
66- "capsSwitch": True,
67- "bodyFont": "Roboto",
68- "availableViews": [],
69- "viewSource": None,
70- "autoRecVideo": None,
71- "toolbox": {
72- "kind": "flyoutToolbox",
73- "contents": []
74- },
75- "buttons": [
76- {
77- "action": "clearProgramDlg",
78- "icon": "clear",
79- "label": "message.activity_program_clear",
80- "type": "text",
81- },
82- {
83- "action": 'saveProgram',
84- "icon": 'save',
85- "label": 'message.activity_program_save',
86- "type": 'text',
87- },
88- {
89- "action": 'toggleSaveAs',
90- "icon": 'edit',
91- "label": 'message.activity_program_save_as',
92- "type": 'text',
93- },
94- {
95- "action": 'loadProgramList',
96- "icon": 'folder_open',
97- "label": 'message.activity_program_load',
98- "type": 'text',
99- },
100- {
101- "action": 'runProgram',
102- "icon": 'play_arrow',
103- "label": 'message.activity_program_run',
104- "type": 'text',
105- },
106- {
107- "action": 'getProgramCode',
108- "icon": 'code',
109- "label": 'message.activity_program_show_code',
110- "type": 'text',
111- },
112- {
113- "action": 'exportProgram',
114- "icon": 'fa-file-export',
115- "label": 'message.activity_program_export',
116- "type": 'text',
117- },
118- {
119- "action": 'pickFile',
120- "icon": 'fa-file-import',
121- "label": 'message.activity_program_import',
122- "type": 'text',
123- }],
124- }
125- """
126- self .save (activity )
127-
45+
0 commit comments