Funktionierender Prototyp des Serious Games zur Vermittlung von Wissen zu Software-Engineering-Arbeitsmodellen.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

PythonImportHelper-v2-Completion.json 86KB

1 year ago
1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798991001011021031041051061071081091101111121131141151161171181191201211221231241251261271281291301311321331341351361371381391401411421431441451461471481491501511521531541551561571581591601611621631641651661671681691701711721731741751761771781791801811821831841851861871881891901911921931941951961971981992002012022032042052062072082092102112122132142152162172182192202212222232242252262272282292302312322332342352362372382392402412422432442452462472482492502512522532542552562572582592602612622632642652662672682692702712722732742752762772782792802812822832842852862872882892902912922932942952962972982993003013023033043053063073083093103113123133143153163173183193203213223233243253263273283293303313323333343353363373383393403413423433443453463473483493503513523533543553563573583593603613623633643653663673683693703713723733743753763773783793803813823833843853863873883893903913923933943953963973983994004014024034044054064074084094104114124134144154164174184194204214224234244254264274284294304314324334344354364374384394404414424434444454464474484494504514524534544554564574584594604614624634644654664674684694704714724734744754764774784794804814824834844854864874884894904914924934944954964974984995005015025035045055065075085095105115125135145155165175185195205215225235245255265275285295305315325335345355365375385395405415425435445455465475485495505515525535545555565575585595605615625635645655665675685695705715725735745755765775785795805815825835845855865875885895905915925935945955965975985996006016026036046056066076086096106116126136146156166176186196206216226236246256266276286296306316326336346356366376386396406416426436446456466476486496506516526536546556566576586596606616626636646656666676686696706716726736746756766776786796806816826836846856866876886896906916926936946956966976986997007017027037047057067077087097107117127137147157167177187197207217227237247257267277287297307317327337347357367377387397407417427437447457467477487497507517527537547557567577587597607617627637647657667677687697707717727737747757767777787797807817827837847857867877887897907917927937947957967977987998008018028038048058068078088098108118128138148158168178188198208218228238248258268278288298308318328338348358368378388398408418428438448458468478488498508518528538548558568578588598608618628638648658668678688698708718728738748758768778788798808818828838848858868878888898908918928938948958968978988999009019029039049059069079089099109119129139149159169179189199209219229239249259269279289299309319329339349359369379389399409419429439449459469479489499509519529539549559569579589599609619629639649659669679689699709719729739749759769779789799809819829839849859869879889899909919929939949959969979989991000100110021003100410051006100710081009101010111012101310141015101610171018101910201021102210231024102510261027102810291030103110321033103410351036103710381039104010411042104310441045104610471048104910501051105210531054105510561057105810591060106110621063106410651066106710681069107010711072107310741075107610771078107910801081108210831084108510861087108810891090109110921093109410951096109710981099110011011102110311041105110611071108110911101111111211131114111511161117111811191120112111221123112411251126112711281129113011311132113311341135113611371138113911401141114211431144114511461147114811491150115111521153115411551156115711581159116011611162116311641165116611671168116911701171117211731174117511761177117811791180118111821183118411851186118711881189119011911192119311941195119611971198119912001201120212031204120512061207120812091210121112121213121412151216121712181219122012211222122312241225122612271228122912301231123212331234123512361237123812391240124112421243124412451246124712481249125012511252125312541255125612571258125912601261126212631264126512661267126812691270127112721273127412751276127712781279128012811282128312841285128612871288128912901291129212931294129512961297129812991300130113021303130413051306130713081309131013111312131313141315131613171318131913201321132213231324132513261327132813291330133113321333133413351336133713381339134013411342134313441345134613471348134913501351135213531354135513561357135813591360136113621363136413651366136713681369137013711372137313741375137613771378137913801381138213831384138513861387138813891390139113921393139413951396139713981399140014011402140314041405140614071408140914101411141214131414141514161417141814191420142114221423142414251426142714281429143014311432143314341435143614371438143914401441144214431444144514461447144814491450145114521453145414551456145714581459146014611462146314641465146614671468146914701471147214731474147514761477147814791480148114821483148414851486148714881489149014911492149314941495149614971498149915001501150215031504150515061507150815091510151115121513151415151516151715181519152015211522152315241525152615271528152915301531153215331534153515361537153815391540154115421543154415451546154715481549155015511552155315541555155615571558155915601561156215631564156515661567156815691570157115721573157415751576157715781579158015811582158315841585158615871588158915901591159215931594159515961597159815991600160116021603160416051606160716081609161016111612161316141615161616171618161916201621162216231624162516261627162816291630163116321633163416351636163716381639164016411642164316441645164616471648164916501651165216531654165516561657165816591660166116621663
  1. [
  2. {
  3. "label": "glob",
  4. "kind": 6,
  5. "isExtraImport": true,
  6. "importPath": "glob",
  7. "description": "glob",
  8. "detail": "glob",
  9. "documentation": {}
  10. },
  11. {
  12. "label": "os",
  13. "kind": 6,
  14. "isExtraImport": true,
  15. "importPath": "os",
  16. "description": "os",
  17. "detail": "os",
  18. "documentation": {}
  19. },
  20. {
  21. "label": "shutil",
  22. "kind": 6,
  23. "isExtraImport": true,
  24. "importPath": "shutil",
  25. "description": "shutil",
  26. "detail": "shutil",
  27. "documentation": {}
  28. },
  29. {
  30. "label": "sys",
  31. "kind": 6,
  32. "isExtraImport": true,
  33. "importPath": "sys",
  34. "description": "sys",
  35. "detail": "sys",
  36. "documentation": {}
  37. },
  38. {
  39. "label": "sysconfig",
  40. "kind": 6,
  41. "isExtraImport": true,
  42. "importPath": "sysconfig",
  43. "description": "sysconfig",
  44. "detail": "sysconfig",
  45. "documentation": {}
  46. },
  47. {
  48. "label": "tempfile",
  49. "kind": 6,
  50. "isExtraImport": true,
  51. "importPath": "tempfile",
  52. "description": "tempfile",
  53. "detail": "tempfile",
  54. "documentation": {}
  55. },
  56. {
  57. "label": "site",
  58. "kind": 6,
  59. "isExtraImport": true,
  60. "importPath": "site",
  61. "description": "site",
  62. "detail": "site",
  63. "documentation": {}
  64. },
  65. {
  66. "label": "subprocess",
  67. "kind": 6,
  68. "isExtraImport": true,
  69. "importPath": "subprocess",
  70. "description": "subprocess",
  71. "detail": "subprocess",
  72. "documentation": {}
  73. },
  74. {
  75. "label": "models",
  76. "importPath": "django.db",
  77. "description": "django.db",
  78. "isExtraImport": true,
  79. "detail": "django.db",
  80. "documentation": {}
  81. },
  82. {
  83. "label": "models",
  84. "importPath": "django.db",
  85. "description": "django.db",
  86. "isExtraImport": true,
  87. "detail": "django.db",
  88. "documentation": {}
  89. },
  90. {
  91. "label": "models",
  92. "importPath": "django.db",
  93. "description": "django.db",
  94. "isExtraImport": true,
  95. "detail": "django.db",
  96. "documentation": {}
  97. },
  98. {
  99. "label": "models",
  100. "importPath": "django.db",
  101. "description": "django.db",
  102. "isExtraImport": true,
  103. "detail": "django.db",
  104. "documentation": {}
  105. },
  106. {
  107. "label": "models",
  108. "importPath": "django.db",
  109. "description": "django.db",
  110. "isExtraImport": true,
  111. "detail": "django.db",
  112. "documentation": {}
  113. },
  114. {
  115. "label": "models",
  116. "importPath": "django.db",
  117. "description": "django.db",
  118. "isExtraImport": true,
  119. "detail": "django.db",
  120. "documentation": {}
  121. },
  122. {
  123. "label": "models",
  124. "importPath": "django.db",
  125. "description": "django.db",
  126. "isExtraImport": true,
  127. "detail": "django.db",
  128. "documentation": {}
  129. },
  130. {
  131. "label": "models",
  132. "importPath": "django.db",
  133. "description": "django.db",
  134. "isExtraImport": true,
  135. "detail": "django.db",
  136. "documentation": {}
  137. },
  138. {
  139. "label": "models",
  140. "importPath": "django.db",
  141. "description": "django.db",
  142. "isExtraImport": true,
  143. "detail": "django.db",
  144. "documentation": {}
  145. },
  146. {
  147. "label": "models",
  148. "importPath": "django.db",
  149. "description": "django.db",
  150. "isExtraImport": true,
  151. "detail": "django.db",
  152. "documentation": {}
  153. },
  154. {
  155. "label": "models",
  156. "importPath": "django.db",
  157. "description": "django.db",
  158. "isExtraImport": true,
  159. "detail": "django.db",
  160. "documentation": {}
  161. },
  162. {
  163. "label": "migrations",
  164. "importPath": "django.db",
  165. "description": "django.db",
  166. "isExtraImport": true,
  167. "detail": "django.db",
  168. "documentation": {}
  169. },
  170. {
  171. "label": "models",
  172. "importPath": "django.db",
  173. "description": "django.db",
  174. "isExtraImport": true,
  175. "detail": "django.db",
  176. "documentation": {}
  177. },
  178. {
  179. "label": "migrations",
  180. "importPath": "django.db",
  181. "description": "django.db",
  182. "isExtraImport": true,
  183. "detail": "django.db",
  184. "documentation": {}
  185. },
  186. {
  187. "label": "models",
  188. "importPath": "django.db",
  189. "description": "django.db",
  190. "isExtraImport": true,
  191. "detail": "django.db",
  192. "documentation": {}
  193. },
  194. {
  195. "label": "migrations",
  196. "importPath": "django.db",
  197. "description": "django.db",
  198. "isExtraImport": true,
  199. "detail": "django.db",
  200. "documentation": {}
  201. },
  202. {
  203. "label": "models",
  204. "importPath": "django.db",
  205. "description": "django.db",
  206. "isExtraImport": true,
  207. "detail": "django.db",
  208. "documentation": {}
  209. },
  210. {
  211. "label": "PolymorphicModel",
  212. "importPath": "polymorphic.models",
  213. "description": "polymorphic.models",
  214. "isExtraImport": true,
  215. "detail": "polymorphic.models",
  216. "documentation": {}
  217. },
  218. {
  219. "label": "PolymorphicModel",
  220. "importPath": "polymorphic.models",
  221. "description": "polymorphic.models",
  222. "isExtraImport": true,
  223. "detail": "polymorphic.models",
  224. "documentation": {}
  225. },
  226. {
  227. "label": "PolymorphicModel",
  228. "importPath": "polymorphic.models",
  229. "description": "polymorphic.models",
  230. "isExtraImport": true,
  231. "detail": "polymorphic.models",
  232. "documentation": {}
  233. },
  234. {
  235. "label": "random",
  236. "kind": 6,
  237. "isExtraImport": true,
  238. "importPath": "random",
  239. "description": "random",
  240. "detail": "random",
  241. "documentation": {}
  242. },
  243. {
  244. "label": "django.core.validators",
  245. "kind": 6,
  246. "isExtraImport": true,
  247. "importPath": "django.core.validators",
  248. "description": "django.core.validators",
  249. "detail": "django.core.validators",
  250. "documentation": {}
  251. },
  252. {
  253. "label": "MaxValueValidator",
  254. "importPath": "django.core.validators",
  255. "description": "django.core.validators",
  256. "isExtraImport": true,
  257. "detail": "django.core.validators",
  258. "documentation": {}
  259. },
  260. {
  261. "label": "MinValueValidator",
  262. "importPath": "django.core.validators",
  263. "description": "django.core.validators",
  264. "isExtraImport": true,
  265. "detail": "django.core.validators",
  266. "documentation": {}
  267. },
  268. {
  269. "label": "MaxValueValidator",
  270. "importPath": "django.core.validators",
  271. "description": "django.core.validators",
  272. "isExtraImport": true,
  273. "detail": "django.core.validators",
  274. "documentation": {}
  275. },
  276. {
  277. "label": "MinValueValidator",
  278. "importPath": "django.core.validators",
  279. "description": "django.core.validators",
  280. "isExtraImport": true,
  281. "detail": "django.core.validators",
  282. "documentation": {}
  283. },
  284. {
  285. "label": "MaxValueValidator",
  286. "importPath": "django.core.validators",
  287. "description": "django.core.validators",
  288. "isExtraImport": true,
  289. "detail": "django.core.validators",
  290. "documentation": {}
  291. },
  292. {
  293. "label": "MinValueValidator",
  294. "importPath": "django.core.validators",
  295. "description": "django.core.validators",
  296. "isExtraImport": true,
  297. "detail": "django.core.validators",
  298. "documentation": {}
  299. },
  300. {
  301. "label": "MaxValueValidator",
  302. "importPath": "django.core.validators",
  303. "description": "django.core.validators",
  304. "isExtraImport": true,
  305. "detail": "django.core.validators",
  306. "documentation": {}
  307. },
  308. {
  309. "label": "MinValueValidator",
  310. "importPath": "django.core.validators",
  311. "description": "django.core.validators",
  312. "isExtraImport": true,
  313. "detail": "django.core.validators",
  314. "documentation": {}
  315. },
  316. {
  317. "label": "*",
  318. "importPath": "django.core.validators",
  319. "description": "django.core.validators",
  320. "isExtraImport": true,
  321. "detail": "django.core.validators",
  322. "documentation": {}
  323. },
  324. {
  325. "label": "SpecialOrder",
  326. "importPath": "mygame.backend.event",
  327. "description": "mygame.backend.event",
  328. "isExtraImport": true,
  329. "detail": "mygame.backend.event",
  330. "documentation": {}
  331. },
  332. {
  333. "label": "SpecialOrder",
  334. "importPath": "mygame.backend.event",
  335. "description": "mygame.backend.event",
  336. "isExtraImport": true,
  337. "detail": "mygame.backend.event",
  338. "documentation": {}
  339. },
  340. {
  341. "label": "threading",
  342. "kind": 6,
  343. "isExtraImport": true,
  344. "importPath": "threading",
  345. "description": "threading",
  346. "detail": "threading",
  347. "documentation": {}
  348. },
  349. {
  350. "label": "time",
  351. "kind": 6,
  352. "isExtraImport": true,
  353. "importPath": "time",
  354. "description": "time",
  355. "detail": "time",
  356. "documentation": {}
  357. },
  358. {
  359. "label": "django.db.models.deletion",
  360. "kind": 6,
  361. "isExtraImport": true,
  362. "importPath": "django.db.models.deletion",
  363. "description": "django.db.models.deletion",
  364. "detail": "django.db.models.deletion",
  365. "documentation": {}
  366. },
  367. {
  368. "label": "template",
  369. "importPath": "django",
  370. "description": "django",
  371. "isExtraImport": true,
  372. "detail": "django",
  373. "documentation": {}
  374. },
  375. {
  376. "label": "forms",
  377. "importPath": "django",
  378. "description": "django",
  379. "isExtraImport": true,
  380. "detail": "django",
  381. "documentation": {}
  382. },
  383. {
  384. "label": "admin",
  385. "importPath": "django.contrib",
  386. "description": "django.contrib",
  387. "isExtraImport": true,
  388. "detail": "django.contrib",
  389. "documentation": {}
  390. },
  391. {
  392. "label": "admin",
  393. "importPath": "django.contrib",
  394. "description": "django.contrib",
  395. "isExtraImport": true,
  396. "detail": "django.contrib",
  397. "documentation": {}
  398. },
  399. {
  400. "label": "AppConfig",
  401. "importPath": "django.apps",
  402. "description": "django.apps",
  403. "isExtraImport": true,
  404. "detail": "django.apps",
  405. "documentation": {}
  406. },
  407. {
  408. "label": "asyncio",
  409. "kind": 6,
  410. "isExtraImport": true,
  411. "importPath": "asyncio",
  412. "description": "asyncio",
  413. "detail": "asyncio",
  414. "documentation": {}
  415. },
  416. {
  417. "label": "AsyncWebsocketConsumer",
  418. "importPath": "channels.generic.websocket",
  419. "description": "channels.generic.websocket",
  420. "isExtraImport": true,
  421. "detail": "channels.generic.websocket",
  422. "documentation": {}
  423. },
  424. {
  425. "label": "database_sync_to_async",
  426. "importPath": "channels.db",
  427. "description": "channels.db",
  428. "isExtraImport": true,
  429. "detail": "channels.db",
  430. "documentation": {}
  431. },
  432. {
  433. "label": "re_path",
  434. "importPath": "django.urls",
  435. "description": "django.urls",
  436. "isExtraImport": true,
  437. "detail": "django.urls",
  438. "documentation": {}
  439. },
  440. {
  441. "label": "path",
  442. "importPath": "django.urls",
  443. "description": "django.urls",
  444. "isExtraImport": true,
  445. "detail": "django.urls",
  446. "documentation": {}
  447. },
  448. {
  449. "label": "reverse",
  450. "importPath": "django.urls",
  451. "description": "django.urls",
  452. "isExtraImport": true,
  453. "detail": "django.urls",
  454. "documentation": {}
  455. },
  456. {
  457. "label": "path",
  458. "importPath": "django.urls",
  459. "description": "django.urls",
  460. "isExtraImport": true,
  461. "detail": "django.urls",
  462. "documentation": {}
  463. },
  464. {
  465. "label": "include",
  466. "importPath": "django.urls",
  467. "description": "django.urls",
  468. "isExtraImport": true,
  469. "detail": "django.urls",
  470. "documentation": {}
  471. },
  472. {
  473. "label": "include",
  474. "importPath": "django.urls",
  475. "description": "django.urls",
  476. "isExtraImport": true,
  477. "detail": "django.urls",
  478. "documentation": {}
  479. },
  480. {
  481. "label": "path",
  482. "importPath": "django.urls",
  483. "description": "django.urls",
  484. "isExtraImport": true,
  485. "detail": "django.urls",
  486. "documentation": {}
  487. },
  488. {
  489. "label": "TestCase",
  490. "importPath": "django.test",
  491. "description": "django.test",
  492. "isExtraImport": true,
  493. "detail": "django.test",
  494. "documentation": {}
  495. },
  496. {
  497. "label": "get_object_or_404",
  498. "importPath": "django.shortcuts",
  499. "description": "django.shortcuts",
  500. "isExtraImport": true,
  501. "detail": "django.shortcuts",
  502. "documentation": {}
  503. },
  504. {
  505. "label": "render",
  506. "importPath": "django.shortcuts",
  507. "description": "django.shortcuts",
  508. "isExtraImport": true,
  509. "detail": "django.shortcuts",
  510. "documentation": {}
  511. },
  512. {
  513. "label": "redirect",
  514. "importPath": "django.shortcuts",
  515. "description": "django.shortcuts",
  516. "isExtraImport": true,
  517. "detail": "django.shortcuts",
  518. "documentation": {}
  519. },
  520. {
  521. "label": "HttpResponseRedirect",
  522. "importPath": "django.http",
  523. "description": "django.http",
  524. "isExtraImport": true,
  525. "detail": "django.http",
  526. "documentation": {}
  527. },
  528. {
  529. "label": "*",
  530. "importPath": "mygame.forms",
  531. "description": "mygame.forms",
  532. "isExtraImport": true,
  533. "detail": "mygame.forms",
  534. "documentation": {}
  535. },
  536. {
  537. "label": "User",
  538. "importPath": "django.contrib.auth.models",
  539. "description": "django.contrib.auth.models",
  540. "isExtraImport": true,
  541. "detail": "django.contrib.auth.models",
  542. "documentation": {}
  543. },
  544. {
  545. "label": "authenticate",
  546. "importPath": "django.contrib.auth",
  547. "description": "django.contrib.auth",
  548. "isExtraImport": true,
  549. "detail": "django.contrib.auth",
  550. "documentation": {}
  551. },
  552. {
  553. "label": "login",
  554. "importPath": "django.contrib.auth",
  555. "description": "django.contrib.auth",
  556. "isExtraImport": true,
  557. "detail": "django.contrib.auth",
  558. "documentation": {}
  559. },
  560. {
  561. "label": "EngineeringModel",
  562. "importPath": "mygame.backend.engineeringmodel",
  563. "description": "mygame.backend.engineeringmodel",
  564. "isExtraImport": true,
  565. "detail": "mygame.backend.engineeringmodel",
  566. "documentation": {}
  567. },
  568. {
  569. "label": "get_asgi_application",
  570. "importPath": "django.core.asgi",
  571. "description": "django.core.asgi",
  572. "isExtraImport": true,
  573. "detail": "django.core.asgi",
  574. "documentation": {}
  575. },
  576. {
  577. "label": "AuthMiddlewareStack",
  578. "importPath": "channels.auth",
  579. "description": "channels.auth",
  580. "isExtraImport": true,
  581. "detail": "channels.auth",
  582. "documentation": {}
  583. },
  584. {
  585. "label": "AuthMiddlewareStack",
  586. "importPath": "channels.auth",
  587. "description": "channels.auth",
  588. "isExtraImport": true,
  589. "detail": "channels.auth",
  590. "documentation": {}
  591. },
  592. {
  593. "label": "ProtocolTypeRouter",
  594. "importPath": "channels.routing",
  595. "description": "channels.routing",
  596. "isExtraImport": true,
  597. "detail": "channels.routing",
  598. "documentation": {}
  599. },
  600. {
  601. "label": "URLRouter",
  602. "importPath": "channels.routing",
  603. "description": "channels.routing",
  604. "isExtraImport": true,
  605. "detail": "channels.routing",
  606. "documentation": {}
  607. },
  608. {
  609. "label": "ProtocolTypeRouter",
  610. "importPath": "channels.routing",
  611. "description": "channels.routing",
  612. "isExtraImport": true,
  613. "detail": "channels.routing",
  614. "documentation": {}
  615. },
  616. {
  617. "label": "URLRouter",
  618. "importPath": "channels.routing",
  619. "description": "channels.routing",
  620. "isExtraImport": true,
  621. "detail": "channels.routing",
  622. "documentation": {}
  623. },
  624. {
  625. "label": "AllowedHostsOriginValidator",
  626. "importPath": "channels.security.websocket",
  627. "description": "channels.security.websocket",
  628. "isExtraImport": true,
  629. "detail": "channels.security.websocket",
  630. "documentation": {}
  631. },
  632. {
  633. "label": "mygame.routing",
  634. "kind": 6,
  635. "isExtraImport": true,
  636. "importPath": "mygame.routing",
  637. "description": "mygame.routing",
  638. "detail": "mygame.routing",
  639. "documentation": {}
  640. },
  641. {
  642. "label": "Path",
  643. "importPath": "pathlib",
  644. "description": "pathlib",
  645. "isExtraImport": true,
  646. "detail": "pathlib",
  647. "documentation": {}
  648. },
  649. {
  650. "label": "settings",
  651. "importPath": "django.conf",
  652. "description": "django.conf",
  653. "isExtraImport": true,
  654. "detail": "django.conf",
  655. "documentation": {}
  656. },
  657. {
  658. "label": "static",
  659. "importPath": "django.conf.urls.static",
  660. "description": "django.conf.urls.static",
  661. "isExtraImport": true,
  662. "detail": "django.conf.urls.static",
  663. "documentation": {}
  664. },
  665. {
  666. "label": "get_wsgi_application",
  667. "importPath": "django.core.wsgi",
  668. "description": "django.core.wsgi",
  669. "isExtraImport": true,
  670. "detail": "django.core.wsgi",
  671. "documentation": {}
  672. },
  673. {
  674. "label": "x",
  675. "kind": 5,
  676. "importPath": "Ausarbeitung.thesis-template-master.listings.example",
  677. "description": "Ausarbeitung.thesis-template-master.listings.example",
  678. "peekOfCode": "x = 1\nif x == 1:\n # indented four spaces\n print(\"x is 1.\")",
  679. "detail": "Ausarbeitung.thesis-template-master.listings.example",
  680. "documentation": {}
  681. },
  682. {
  683. "label": "Tee",
  684. "kind": 6,
  685. "importPath": "environment.Scripts.pywin32_postinstall",
  686. "description": "environment.Scripts.pywin32_postinstall",
  687. "peekOfCode": "class Tee:\n def __init__(self, file):\n self.f = file\n def write(self, what):\n if self.f is not None:\n try:\n self.f.write(what.replace(\"\\n\", \"\\r\\n\"))\n except IOError:\n pass\n tee_f.write(what)",
  688. "detail": "environment.Scripts.pywin32_postinstall",
  689. "documentation": {}
  690. },
  691. {
  692. "label": "CopyTo",
  693. "kind": 2,
  694. "importPath": "environment.Scripts.pywin32_postinstall",
  695. "description": "environment.Scripts.pywin32_postinstall",
  696. "peekOfCode": "def CopyTo(desc, src, dest):\n import win32api\n import win32con\n while 1:\n try:\n win32api.CopyFile(src, dest, 0)\n return\n except win32api.error as details:\n if details.winerror == 5: # access denied - user not admin.\n raise",
  697. "detail": "environment.Scripts.pywin32_postinstall",
  698. "documentation": {}
  699. },
  700. {
  701. "label": "LoadSystemModule",
  702. "kind": 2,
  703. "importPath": "environment.Scripts.pywin32_postinstall",
  704. "description": "environment.Scripts.pywin32_postinstall",
  705. "peekOfCode": "def LoadSystemModule(lib_dir, modname):\n # See if this is a debug build.\n import importlib.machinery\n import importlib.util\n suffix = \"_d\" if \"_d.pyd\" in importlib.machinery.EXTENSION_SUFFIXES else \"\"\n filename = \"%s%d%d%s.dll\" % (\n modname,\n sys.version_info[0],\n sys.version_info[1],\n suffix,",
  706. "detail": "environment.Scripts.pywin32_postinstall",
  707. "documentation": {}
  708. },
  709. {
  710. "label": "SetPyKeyVal",
  711. "kind": 2,
  712. "importPath": "environment.Scripts.pywin32_postinstall",
  713. "description": "environment.Scripts.pywin32_postinstall",
  714. "peekOfCode": "def SetPyKeyVal(key_name, value_name, value):\n root_hkey = get_root_hkey()\n root_key = winreg.OpenKey(root_hkey, root_key_name)\n try:\n my_key = winreg.CreateKey(root_key, key_name)\n try:\n winreg.SetValueEx(my_key, value_name, 0, winreg.REG_SZ, value)\n if verbose:\n print(\"-> %s\\\\%s[%s]=%r\" % (root_key_name, key_name, value_name, value))\n finally:",
  715. "detail": "environment.Scripts.pywin32_postinstall",
  716. "documentation": {}
  717. },
  718. {
  719. "label": "UnsetPyKeyVal",
  720. "kind": 2,
  721. "importPath": "environment.Scripts.pywin32_postinstall",
  722. "description": "environment.Scripts.pywin32_postinstall",
  723. "peekOfCode": "def UnsetPyKeyVal(key_name, value_name, delete_key=False):\n root_hkey = get_root_hkey()\n root_key = winreg.OpenKey(root_hkey, root_key_name)\n try:\n my_key = winreg.OpenKey(root_key, key_name, 0, winreg.KEY_SET_VALUE)\n try:\n winreg.DeleteValue(my_key, value_name)\n if verbose:\n print(\"-> DELETE %s\\\\%s[%s]\" % (root_key_name, key_name, value_name))\n finally:",
  724. "detail": "environment.Scripts.pywin32_postinstall",
  725. "documentation": {}
  726. },
  727. {
  728. "label": "RegisterCOMObjects",
  729. "kind": 2,
  730. "importPath": "environment.Scripts.pywin32_postinstall",
  731. "description": "environment.Scripts.pywin32_postinstall",
  732. "peekOfCode": "def RegisterCOMObjects(register=True):\n import win32com.server.register\n if register:\n func = win32com.server.register.RegisterClasses\n else:\n func = win32com.server.register.UnregisterClasses\n flags = {}\n if not verbose:\n flags[\"quiet\"] = 1\n for module, klass_name in com_modules:",
  733. "detail": "environment.Scripts.pywin32_postinstall",
  734. "documentation": {}
  735. },
  736. {
  737. "label": "RegisterHelpFile",
  738. "kind": 2,
  739. "importPath": "environment.Scripts.pywin32_postinstall",
  740. "description": "environment.Scripts.pywin32_postinstall",
  741. "peekOfCode": "def RegisterHelpFile(register=True, lib_dir=None):\n if lib_dir is None:\n lib_dir = sysconfig.get_paths()[\"platlib\"]\n if register:\n # Register the .chm help file.\n chm_file = os.path.join(lib_dir, \"PyWin32.chm\")\n if os.path.isfile(chm_file):\n # This isn't recursive, so if 'Help' doesn't exist, we croak\n SetPyKeyVal(\"Help\", None, None)\n SetPyKeyVal(\"Help\\\\Pythonwin Reference\", None, chm_file)",
  742. "detail": "environment.Scripts.pywin32_postinstall",
  743. "documentation": {}
  744. },
  745. {
  746. "label": "RegisterPythonwin",
  747. "kind": 2,
  748. "importPath": "environment.Scripts.pywin32_postinstall",
  749. "description": "environment.Scripts.pywin32_postinstall",
  750. "peekOfCode": "def RegisterPythonwin(register=True, lib_dir=None):\n \"\"\"Add (or remove) Pythonwin to context menu for python scripts.\n ??? Should probably also add Edit command for pys files also.\n Also need to remove these keys on uninstall, but there's no function\n like file_created to add registry entries to uninstall log ???\n \"\"\"\n import os\n if lib_dir is None:\n lib_dir = sysconfig.get_paths()[\"platlib\"]\n classes_root = get_root_hkey()",
  751. "detail": "environment.Scripts.pywin32_postinstall",
  752. "documentation": {}
  753. },
  754. {
  755. "label": "get_shortcuts_folder",
  756. "kind": 2,
  757. "importPath": "environment.Scripts.pywin32_postinstall",
  758. "description": "environment.Scripts.pywin32_postinstall",
  759. "peekOfCode": "def get_shortcuts_folder():\n if get_root_hkey() == winreg.HKEY_LOCAL_MACHINE:\n try:\n fldr = get_special_folder_path(\"CSIDL_COMMON_PROGRAMS\")\n except OSError:\n # No CSIDL_COMMON_PROGRAMS on this platform\n fldr = get_special_folder_path(\"CSIDL_PROGRAMS\")\n else:\n # non-admin install - always goes in this user's start menu.\n fldr = get_special_folder_path(\"CSIDL_PROGRAMS\")",
  760. "detail": "environment.Scripts.pywin32_postinstall",
  761. "documentation": {}
  762. },
  763. {
  764. "label": "get_system_dir",
  765. "kind": 2,
  766. "importPath": "environment.Scripts.pywin32_postinstall",
  767. "description": "environment.Scripts.pywin32_postinstall",
  768. "peekOfCode": "def get_system_dir():\n import win32api # we assume this exists.\n try:\n import pythoncom\n import win32process\n from win32com.shell import shell, shellcon\n try:\n if win32process.IsWow64Process():\n return shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_SYSTEMX86)\n return shell.SHGetSpecialFolderPath(0, shellcon.CSIDL_SYSTEM)",
  769. "detail": "environment.Scripts.pywin32_postinstall",
  770. "documentation": {}
  771. },
  772. {
  773. "label": "fixup_dbi",
  774. "kind": 2,
  775. "importPath": "environment.Scripts.pywin32_postinstall",
  776. "description": "environment.Scripts.pywin32_postinstall",
  777. "peekOfCode": "def fixup_dbi():\n # We used to have a dbi.pyd with our .pyd files, but now have a .py file.\n # If the user didn't uninstall, they will find the .pyd which will cause\n # problems - so handle that.\n import win32api\n import win32con\n pyd_name = os.path.join(os.path.dirname(win32api.__file__), \"dbi.pyd\")\n pyd_d_name = os.path.join(os.path.dirname(win32api.__file__), \"dbi_d.pyd\")\n py_name = os.path.join(os.path.dirname(win32con.__file__), \"dbi.py\")\n for this_pyd in (pyd_name, pyd_d_name):",
  778. "detail": "environment.Scripts.pywin32_postinstall",
  779. "documentation": {}
  780. },
  781. {
  782. "label": "install",
  783. "kind": 2,
  784. "importPath": "environment.Scripts.pywin32_postinstall",
  785. "description": "environment.Scripts.pywin32_postinstall",
  786. "peekOfCode": "def install(lib_dir):\n import traceback\n # The .pth file is now installed as a regular file.\n # Create the .pth file in the site-packages dir, and use only relative paths\n # We used to write a .pth directly to sys.prefix - clobber it.\n if os.path.isfile(os.path.join(sys.prefix, \"pywin32.pth\")):\n os.unlink(os.path.join(sys.prefix, \"pywin32.pth\"))\n # The .pth may be new and therefore not loaded in this session.\n # Setup the paths just in case.\n for name in \"win32 win32\\\\lib Pythonwin\".split():",
  787. "detail": "environment.Scripts.pywin32_postinstall",
  788. "documentation": {}
  789. },
  790. {
  791. "label": "uninstall",
  792. "kind": 2,
  793. "importPath": "environment.Scripts.pywin32_postinstall",
  794. "description": "environment.Scripts.pywin32_postinstall",
  795. "peekOfCode": "def uninstall(lib_dir):\n # First ensure our system modules are loaded from pywin32_system, so\n # we can remove the ones we copied...\n LoadSystemModule(lib_dir, \"pywintypes\")\n LoadSystemModule(lib_dir, \"pythoncom\")\n try:\n RegisterCOMObjects(False)\n except Exception as why:\n print(\"Failed to unregister COM objects: %s\" % (why,))\n try:",
  796. "detail": "environment.Scripts.pywin32_postinstall",
  797. "documentation": {}
  798. },
  799. {
  800. "label": "verify_destination",
  801. "kind": 2,
  802. "importPath": "environment.Scripts.pywin32_postinstall",
  803. "description": "environment.Scripts.pywin32_postinstall",
  804. "peekOfCode": "def verify_destination(location):\n if not os.path.isdir(location):\n raise argparse.ArgumentTypeError('Path \"{}\" does not exist!'.format(location))\n return location\ndef main():\n import argparse\n parser = argparse.ArgumentParser(\n formatter_class=argparse.RawDescriptionHelpFormatter,\n description=\"\"\"A post-install script for the pywin32 extensions.\n * Typical usage:",
  805. "detail": "environment.Scripts.pywin32_postinstall",
  806. "documentation": {}
  807. },
  808. {
  809. "label": "main",
  810. "kind": 2,
  811. "importPath": "environment.Scripts.pywin32_postinstall",
  812. "description": "environment.Scripts.pywin32_postinstall",
  813. "peekOfCode": "def main():\n import argparse\n parser = argparse.ArgumentParser(\n formatter_class=argparse.RawDescriptionHelpFormatter,\n description=\"\"\"A post-install script for the pywin32 extensions.\n * Typical usage:\n > python pywin32_postinstall.py -install\n If you installed pywin32 via a .exe installer, this should be run\n automatically after installation, but if it fails you can run it again.\n If you installed pywin32 via PIP, you almost certainly need to run this to",
  814. "detail": "environment.Scripts.pywin32_postinstall",
  815. "documentation": {}
  816. },
  817. {
  818. "label": "tee_f",
  819. "kind": 5,
  820. "importPath": "environment.Scripts.pywin32_postinstall",
  821. "description": "environment.Scripts.pywin32_postinstall",
  822. "peekOfCode": "tee_f = open(os.path.join(tempfile.gettempdir(), \"pywin32_postinstall.log\"), \"w\")\nclass Tee:\n def __init__(self, file):\n self.f = file\n def write(self, what):\n if self.f is not None:\n try:\n self.f.write(what.replace(\"\\n\", \"\\r\\n\"))\n except IOError:\n pass",
  823. "detail": "environment.Scripts.pywin32_postinstall",
  824. "documentation": {}
  825. },
  826. {
  827. "label": "sys.stderr",
  828. "kind": 5,
  829. "importPath": "environment.Scripts.pywin32_postinstall",
  830. "description": "environment.Scripts.pywin32_postinstall",
  831. "peekOfCode": "sys.stderr = Tee(sys.stderr)\nsys.stdout = Tee(sys.stdout)\ncom_modules = [\n # module_name, class_names\n (\"win32com.servers.interp\", \"Interpreter\"),\n (\"win32com.servers.dictionary\", \"DictionaryPolicy\"),\n (\"win32com.axscript.client.pyscript\", \"PyScript\"),\n]\n# Is this a 'silent' install - ie, avoid all dialogs.\n# Different than 'verbose'",
  832. "detail": "environment.Scripts.pywin32_postinstall",
  833. "documentation": {}
  834. },
  835. {
  836. "label": "sys.stdout",
  837. "kind": 5,
  838. "importPath": "environment.Scripts.pywin32_postinstall",
  839. "description": "environment.Scripts.pywin32_postinstall",
  840. "peekOfCode": "sys.stdout = Tee(sys.stdout)\ncom_modules = [\n # module_name, class_names\n (\"win32com.servers.interp\", \"Interpreter\"),\n (\"win32com.servers.dictionary\", \"DictionaryPolicy\"),\n (\"win32com.axscript.client.pyscript\", \"PyScript\"),\n]\n# Is this a 'silent' install - ie, avoid all dialogs.\n# Different than 'verbose'\nsilent = 0",
  841. "detail": "environment.Scripts.pywin32_postinstall",
  842. "documentation": {}
  843. },
  844. {
  845. "label": "com_modules",
  846. "kind": 5,
  847. "importPath": "environment.Scripts.pywin32_postinstall",
  848. "description": "environment.Scripts.pywin32_postinstall",
  849. "peekOfCode": "com_modules = [\n # module_name, class_names\n (\"win32com.servers.interp\", \"Interpreter\"),\n (\"win32com.servers.dictionary\", \"DictionaryPolicy\"),\n (\"win32com.axscript.client.pyscript\", \"PyScript\"),\n]\n# Is this a 'silent' install - ie, avoid all dialogs.\n# Different than 'verbose'\nsilent = 0\n# Verbosity of output messages.",
  850. "detail": "environment.Scripts.pywin32_postinstall",
  851. "documentation": {}
  852. },
  853. {
  854. "label": "silent",
  855. "kind": 5,
  856. "importPath": "environment.Scripts.pywin32_postinstall",
  857. "description": "environment.Scripts.pywin32_postinstall",
  858. "peekOfCode": "silent = 0\n# Verbosity of output messages.\nverbose = 1\nroot_key_name = \"Software\\\\Python\\\\PythonCore\\\\\" + sys.winver\ntry:\n # When this script is run from inside the bdist_wininst installer,\n # file_created() and directory_created() are additional builtin\n # functions which write lines to Python23\\pywin32-install.log. This is\n # a list of actions for the uninstaller, the format is inspired by what\n # the Wise installer also creates.",
  859. "detail": "environment.Scripts.pywin32_postinstall",
  860. "documentation": {}
  861. },
  862. {
  863. "label": "verbose",
  864. "kind": 5,
  865. "importPath": "environment.Scripts.pywin32_postinstall",
  866. "description": "environment.Scripts.pywin32_postinstall",
  867. "peekOfCode": "verbose = 1\nroot_key_name = \"Software\\\\Python\\\\PythonCore\\\\\" + sys.winver\ntry:\n # When this script is run from inside the bdist_wininst installer,\n # file_created() and directory_created() are additional builtin\n # functions which write lines to Python23\\pywin32-install.log. This is\n # a list of actions for the uninstaller, the format is inspired by what\n # the Wise installer also creates.\n file_created\n is_bdist_wininst = True",
  868. "detail": "environment.Scripts.pywin32_postinstall",
  869. "documentation": {}
  870. },
  871. {
  872. "label": "root_key_name",
  873. "kind": 5,
  874. "importPath": "environment.Scripts.pywin32_postinstall",
  875. "description": "environment.Scripts.pywin32_postinstall",
  876. "peekOfCode": "root_key_name = \"Software\\\\Python\\\\PythonCore\\\\\" + sys.winver\ntry:\n # When this script is run from inside the bdist_wininst installer,\n # file_created() and directory_created() are additional builtin\n # functions which write lines to Python23\\pywin32-install.log. This is\n # a list of actions for the uninstaller, the format is inspired by what\n # the Wise installer also creates.\n file_created\n is_bdist_wininst = True\nexcept NameError:",
  877. "detail": "environment.Scripts.pywin32_postinstall",
  878. "documentation": {}
  879. },
  880. {
  881. "label": "run_test",
  882. "kind": 2,
  883. "importPath": "environment.Scripts.pywin32_testall",
  884. "description": "environment.Scripts.pywin32_testall",
  885. "peekOfCode": "def run_test(script, cmdline_extras):\n dirname, scriptname = os.path.split(script)\n # some tests prefer to be run from their directory.\n cmd = [sys.executable, \"-u\", scriptname] + cmdline_extras\n print(\"--- Running '%s' ---\" % script)\n sys.stdout.flush()\n result = subprocess.run(cmd, check=False, cwd=dirname)\n print(\"*** Test script '%s' exited with %s\" % (script, result.returncode))\n sys.stdout.flush()\n if result.returncode:",
  886. "detail": "environment.Scripts.pywin32_testall",
  887. "documentation": {}
  888. },
  889. {
  890. "label": "find_and_run",
  891. "kind": 2,
  892. "importPath": "environment.Scripts.pywin32_testall",
  893. "description": "environment.Scripts.pywin32_testall",
  894. "peekOfCode": "def find_and_run(possible_locations, extras):\n for maybe in possible_locations:\n if os.path.isfile(maybe):\n run_test(maybe, extras)\n break\n else:\n raise RuntimeError(\n \"Failed to locate a test script in one of %s\" % possible_locations\n )\ndef main():",
  895. "detail": "environment.Scripts.pywin32_testall",
  896. "documentation": {}
  897. },
  898. {
  899. "label": "main",
  900. "kind": 2,
  901. "importPath": "environment.Scripts.pywin32_testall",
  902. "description": "environment.Scripts.pywin32_testall",
  903. "peekOfCode": "def main():\n import argparse\n code_directories = [this_dir] + site_packages\n parser = argparse.ArgumentParser(\n description=\"A script to trigger tests in all subprojects of PyWin32.\"\n )\n parser.add_argument(\n \"-no-user-interaction\",\n default=False,\n action=\"store_true\",",
  904. "detail": "environment.Scripts.pywin32_testall",
  905. "documentation": {}
  906. },
  907. {
  908. "label": "this_dir",
  909. "kind": 5,
  910. "importPath": "environment.Scripts.pywin32_testall",
  911. "description": "environment.Scripts.pywin32_testall",
  912. "peekOfCode": "this_dir = os.path.dirname(__file__)\nsite_packages = [\n site.getusersitepackages(),\n] + site.getsitepackages()\nfailures = []\n# Run a test using subprocess and wait for the result.\n# If we get an returncode != 0, we know that there was an error, but we don't\n# abort immediately - we run as many tests as we can.\ndef run_test(script, cmdline_extras):\n dirname, scriptname = os.path.split(script)",
  913. "detail": "environment.Scripts.pywin32_testall",
  914. "documentation": {}
  915. },
  916. {
  917. "label": "site_packages",
  918. "kind": 5,
  919. "importPath": "environment.Scripts.pywin32_testall",
  920. "description": "environment.Scripts.pywin32_testall",
  921. "peekOfCode": "site_packages = [\n site.getusersitepackages(),\n] + site.getsitepackages()\nfailures = []\n# Run a test using subprocess and wait for the result.\n# If we get an returncode != 0, we know that there was an error, but we don't\n# abort immediately - we run as many tests as we can.\ndef run_test(script, cmdline_extras):\n dirname, scriptname = os.path.split(script)\n # some tests prefer to be run from their directory.",
  922. "detail": "environment.Scripts.pywin32_testall",
  923. "documentation": {}
  924. },
  925. {
  926. "label": "failures",
  927. "kind": 5,
  928. "importPath": "environment.Scripts.pywin32_testall",
  929. "description": "environment.Scripts.pywin32_testall",
  930. "peekOfCode": "failures = []\n# Run a test using subprocess and wait for the result.\n# If we get an returncode != 0, we know that there was an error, but we don't\n# abort immediately - we run as many tests as we can.\ndef run_test(script, cmdline_extras):\n dirname, scriptname = os.path.split(script)\n # some tests prefer to be run from their directory.\n cmd = [sys.executable, \"-u\", scriptname] + cmdline_extras\n print(\"--- Running '%s' ---\" % script)\n sys.stdout.flush()",
  931. "detail": "environment.Scripts.pywin32_testall",
  932. "documentation": {}
  933. },
  934. {
  935. "label": "Action",
  936. "kind": 6,
  937. "importPath": "mygame.backend.action",
  938. "description": "mygame.backend.action",
  939. "peekOfCode": "class Action(PolymorphicModel):\n name = models.CharField(default=\"random Action\", max_length=20)\n actionmaker = models.ForeignKey(\"Company\", default=1, on_delete=models.CASCADE)\n def execute(self):\n pass\n def cancel(self):\n pass\n def addActionToCompany(self):\n self.actionmaker.addAction(self)\n def __str__(self):",
  940. "detail": "mygame.backend.action",
  941. "documentation": {}
  942. },
  943. {
  944. "label": "ActionEmploy",
  945. "kind": 6,
  946. "importPath": "mygame.backend.action",
  947. "description": "mygame.backend.action",
  948. "peekOfCode": "class ActionEmploy(Action):\n worker = models.ForeignKey(Worker, default=1, on_delete=models.CASCADE)\n @classmethod\n def create(cls, worker, actionmaker):\n # klassenobject erstellen\n name = \"Hiring \" + worker.name\n action = cls(name=name, worker=worker, actionmaker=actionmaker)\n action.save()\n # worker von market entferenen und action zu company hinzufügen\n actionmaker.removeFromWorkermarket(worker)",
  949. "detail": "mygame.backend.action",
  950. "documentation": {}
  951. },
  952. {
  953. "label": "ActionUnemploy",
  954. "kind": 6,
  955. "importPath": "mygame.backend.action",
  956. "description": "mygame.backend.action",
  957. "peekOfCode": "class ActionUnemploy(Action):\n worker = models.ForeignKey(Worker, null=True, blank=True, on_delete=models.CASCADE)\n @classmethod\n def create(cls, worker, actionmaker):\n # klassenobject erstellen\n name = \"Firing \" + worker.name\n action = cls(name=name, worker=worker, actionmaker=actionmaker)\n action.save()\n # workerstatus anpassen und action zu company hinzufügen\n actionmaker.workers.remove(worker)",
  958. "detail": "mygame.backend.action",
  959. "documentation": {}
  960. },
  961. {
  962. "label": "ActionOffer",
  963. "kind": 6,
  964. "importPath": "mygame.backend.action",
  965. "description": "mygame.backend.action",
  966. "peekOfCode": "class ActionOffer(Action):\n order = models.ForeignKey(Order, default=1, on_delete=models.CASCADE)\n amount = models.IntegerField(default=0)\n @classmethod\n def create(cls, order, amount, actionmaker):\n # klassenobject erstellen\n name = \"Offer for \" + order.name\n action = cls(\n name=name,\n order=order,",
  967. "detail": "mygame.backend.action",
  968. "documentation": {}
  969. },
  970. {
  971. "label": "ActionCancelOrder",
  972. "kind": 6,
  973. "importPath": "mygame.backend.action",
  974. "description": "mygame.backend.action",
  975. "peekOfCode": "class ActionCancelOrder(Action):\n order = models.ForeignKey(Order, default=1, on_delete=models.CASCADE)\n @classmethod\n def create(cls, order, actionmaker):\n # klassenobject erstellen\n name = \"Cancel \" + order.name\n action = cls(\n name=name,\n order=order,\n actionmaker=actionmaker,",
  976. "detail": "mygame.backend.action",
  977. "documentation": {}
  978. },
  979. {
  980. "label": "ActionTrain",
  981. "kind": 6,
  982. "importPath": "mygame.backend.action",
  983. "description": "mygame.backend.action",
  984. "peekOfCode": "class ActionTrain(Action):\n worker = models.ForeignKey(Worker, null=True, blank=True, on_delete=models.CASCADE)\n trainskill = models.CharField(default=\"empty\", max_length=50)\n cost = models.IntegerField(default=1000)\n @classmethod\n def create(cls, worker, trainskill, actionmaker):\n # klassenobject erstellen\n name = \"Train Worker \" + worker.name\n action = cls(\n name=name,",
  985. "detail": "mygame.backend.action",
  986. "documentation": {}
  987. },
  988. {
  989. "label": "AttributeSet",
  990. "kind": 6,
  991. "importPath": "mygame.backend.attributeset",
  992. "description": "mygame.backend.attributeset",
  993. "peekOfCode": "class AttributeSet(models.Model):\n experience = models.IntegerField(default=10)\n reliability = models.IntegerField(default=10)\n python = models.IntegerField(default=10)\n javascript = models.IntegerField(default=10)\n cpp = models.IntegerField(default=10)\n management = models.IntegerField(default=10)\n def __str__(self):\n return \"AttributeSet\"\n @classmethod",
  994. "detail": "mygame.backend.attributeset",
  995. "documentation": {}
  996. },
  997. {
  998. "label": "Company",
  999. "kind": 6,
  1000. "importPath": "mygame.backend.company",
  1001. "description": "mygame.backend.company",
  1002. "peekOfCode": "class Company(models.Model):\n name = models.CharField(default=\"A company\", max_length=20)\n user = models.CharField(default=\"default User\", max_length=20)\n customersatisfaction = models.IntegerField(\n default=100, validators=[MinValueValidator(0), MaxValueValidator(100)]\n )\n workersatisfaction = models.IntegerField(\n default=100, validators=[MinValueValidator(0), MaxValueValidator(100)]\n )\n money = models.IntegerField(default=100000)",
  1003. "detail": "mygame.backend.company",
  1004. "documentation": {}
  1005. },
  1006. {
  1007. "label": "EngineeringModel",
  1008. "kind": 6,
  1009. "importPath": "mygame.backend.engineeringmodel",
  1010. "description": "mygame.backend.engineeringmodel",
  1011. "peekOfCode": "class EngineeringModel(PolymorphicModel):\n name = models.CharField(default=\"random EngineeringModel\", max_length=30)\n description = models.CharField(default=\"random description\", max_length=200)\n pros = models.CharField(default=\"random pro\", max_length=100)\n cons = models.CharField(default=\"random con\", max_length=100)\n # wird bei zuweisen des models ausgelöst\n def recalculate(self, order, company):\n pass\n # wird bei workload berechnung ausgelöst, wenn workermodel nicht ordermodel\n def penalty(self, worker, order):",
  1012. "detail": "mygame.backend.engineeringmodel",
  1013. "documentation": {}
  1014. },
  1015. {
  1016. "label": "ModelV",
  1017. "kind": 6,
  1018. "importPath": "mygame.backend.engineeringmodel",
  1019. "description": "mygame.backend.engineeringmodel",
  1020. "peekOfCode": "class ModelV(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # +10 workerSatisfaction +10 happyness\n company.calculateAllWorkersHappyness(addhappyness=10)\n company.calculateWorkerSatisfaction(number=10)\n # +10 customerSatisfaction\n company.calculateCustomerSatisfaction(10)\n # negatives\n # 1: extra work for SOPrototyp und SOChangeRequirement",
  1021. "detail": "mygame.backend.engineeringmodel",
  1022. "documentation": {}
  1023. },
  1024. {
  1025. "label": "ModelSpiral",
  1026. "kind": 6,
  1027. "importPath": "mygame.backend.engineeringmodel",
  1028. "description": "mygame.backend.engineeringmodel",
  1029. "peekOfCode": "class ModelSpiral(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # 1: BONUS AUF SOPrototyp UND SOChangeRequirement\n # +10 customerSatisfaciton\n company.calculateCustomerSatisfaction(10)\n # negatives\n # 1: -10 happyness and workersatisfaction\n company.calculateAllWorkersHappyness(addhappyness=-10)\n company.calculateWorkerSatisfaction(number=-10)",
  1030. "detail": "mygame.backend.engineeringmodel",
  1031. "documentation": {}
  1032. },
  1033. {
  1034. "label": "ModelWaterfall",
  1035. "kind": 6,
  1036. "importPath": "mygame.backend.engineeringmodel",
  1037. "description": "mygame.backend.engineeringmodel",
  1038. "peekOfCode": "class ModelWaterfall(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # +10 workerSatisfaction +10 happyness\n company.calculateAllWorkersHappyness(addhappyness=10)\n company.calculateWorkerSatisfaction(number=10)\n # -10% workload\n order.changeWorkload(0.9)\n # negatives\n # 1: extra work for SOPrototyp und SOChangeRequirement",
  1039. "detail": "mygame.backend.engineeringmodel",
  1040. "documentation": {}
  1041. },
  1042. {
  1043. "label": "ModelScrum",
  1044. "kind": 6,
  1045. "importPath": "mygame.backend.engineeringmodel",
  1046. "description": "mygame.backend.engineeringmodel",
  1047. "peekOfCode": "class ModelScrum(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # 1: BONUS bei SOPrototyp und SOChangeRequirement\n # 2: +20% if skilledModel of worker is scrum\n # IN BONUS HIER UNTEN\n # # negatives\n # 1: random workload shift zwischen 1% und +20%\n randnum = round(random.uniform(1.01, 1.2), 2)\n order.changeWorkload(randnum)",
  1048. "detail": "mygame.backend.engineeringmodel",
  1049. "documentation": {}
  1050. },
  1051. {
  1052. "label": "ModelChaotic",
  1053. "kind": 6,
  1054. "importPath": "mygame.backend.engineeringmodel",
  1055. "description": "mygame.backend.engineeringmodel",
  1056. "peekOfCode": "class ModelChaotic(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # NIX\n # negatives:\n # +10% workload\n order.changeWorkload(1.1)\n # -20 workerSatisfaction -10 happyness\n company.calculateAllWorkersHappyness(addhappyness=-10)\n company.calculateWorkerSatisfaction(number=-20)",
  1057. "detail": "mygame.backend.engineeringmodel",
  1058. "documentation": {}
  1059. },
  1060. {
  1061. "label": "ModelHeyJoe",
  1062. "kind": 6,
  1063. "importPath": "mygame.backend.engineeringmodel",
  1064. "description": "mygame.backend.engineeringmodel",
  1065. "peekOfCode": "class ModelHeyJoe(EngineeringModel):\n def recalculate(self, order, company):\n # positives\n # 1: BONUS AUF SOPrototyp UND SOChangeRequirement\n # +30 customerSatisfaciton\n company.calculateCustomerSatisfaction(30)\n # negatives\n # 1: -10 happyness and workersatisfaction\n company.calculateAllWorkersHappyness(addhappyness=-15)\n company.calculateWorkerSatisfaction(number=-15)",
  1066. "detail": "mygame.backend.engineeringmodel",
  1067. "documentation": {}
  1068. },
  1069. {
  1070. "label": "Event",
  1071. "kind": 6,
  1072. "importPath": "mygame.backend.event",
  1073. "description": "mygame.backend.event",
  1074. "peekOfCode": "class Event(PolymorphicModel):\n name = models.CharField(default=\"random Event\", max_length=40)\n description = models.CharField(default=\"Event description here\", max_length=200)\n @classmethod\n def createEmpty(cls):\n emptyEvent = cls(\n name=\"Your E-Mails are empty\",\n description=\"You do not have E-Mails this round.\",\n )\n emptyEvent.save()",
  1075. "detail": "mygame.backend.event",
  1076. "documentation": {}
  1077. },
  1078. {
  1079. "label": "EventOfferAccepted",
  1080. "kind": 6,
  1081. "importPath": "mygame.backend.event",
  1082. "description": "mygame.backend.event",
  1083. "peekOfCode": "class EventOfferAccepted(Event):\n order = models.ForeignKey(\"Order\", default=1, on_delete=models.CASCADE)\n modelset = models.BooleanField(default=False)\n def setModel(self, model):\n self.order.setEngineeringmodel(model)\n self.modelset = True\n self.save()\nclass SpecialOrder(Event):\n occuranceProbability = models.IntegerField(\n default=100, validators=[MinValueValidator(0), MaxValueValidator(100)]",
  1084. "detail": "mygame.backend.event",
  1085. "documentation": {}
  1086. },
  1087. {
  1088. "label": "SpecialOrder",
  1089. "kind": 6,
  1090. "importPath": "mygame.backend.event",
  1091. "description": "mygame.backend.event",
  1092. "peekOfCode": "class SpecialOrder(Event):\n occuranceProbability = models.IntegerField(\n default=100, validators=[MinValueValidator(0), MaxValueValidator(100)]\n )\n validModels = models.ManyToManyField(EngineeringModel, blank=True)\n occured = models.BooleanField(default=False)\n hint = models.CharField(default=\"no hint\", max_length=100)\n def getValidModels(self):\n vmodels = []\n for model in self.validModels.all():",
  1093. "detail": "mygame.backend.event",
  1094. "documentation": {}
  1095. },
  1096. {
  1097. "label": "SOPrototyp",
  1098. "kind": 6,
  1099. "importPath": "mygame.backend.event",
  1100. "description": "mygame.backend.event",
  1101. "peekOfCode": "class SOPrototyp(SpecialOrder):\n @classmethod\n def createRandom(cls, ordername):\n name = \"Specialorder prototyp request from \" + ordername\n description = (\n \"Your customer for the order \"\n + ordername\n + \" wants you to produce a prototyp for them to review.\"\n )\n # hier random low <5% per round oder high < 40% per round",
  1102. "detail": "mygame.backend.event",
  1103. "documentation": {}
  1104. },
  1105. {
  1106. "label": "SORegularIncrementUpdates",
  1107. "kind": 6,
  1108. "importPath": "mygame.backend.event",
  1109. "description": "mygame.backend.event",
  1110. "peekOfCode": "class SORegularIncrementUpdates(SpecialOrder):\n @classmethod\n def createRandom(cls, ordername):\n name = \"Specialorder regular incremental updates request from \" + ordername\n description = (\n \"Your customer for the order \"\n + ordername\n + \" wants to get regular updates on the increments of the project!\"\n )\n # hier random low <5% per round oder high < 40% per round",
  1111. "detail": "mygame.backend.event",
  1112. "documentation": {}
  1113. },
  1114. {
  1115. "label": "SOChangeRequirement",
  1116. "kind": 6,
  1117. "importPath": "mygame.backend.event",
  1118. "description": "mygame.backend.event",
  1119. "peekOfCode": "class SOChangeRequirement(SpecialOrder):\n @classmethod\n def createRandom(cls, ordername):\n name = \"Specialorder change requirement request from \" + ordername\n description = (\n \"Your customer for the order \"\n + ordername\n + \" wants to change some requirements on your order. \"\n )\n # hier random low <5% per round oder high < 40% per round",
  1120. "detail": "mygame.backend.event",
  1121. "documentation": {}
  1122. },
  1123. {
  1124. "label": "Game",
  1125. "kind": 6,
  1126. "importPath": "mygame.backend.game",
  1127. "description": "mygame.backend.game",
  1128. "peekOfCode": "class Game(models.Model):\n name = models.CharField(default=\"Game\", max_length=20)\n gamemaster = models.CharField(max_length=20)\n running = models.BooleanField(default=False)\n participants = models.ManyToManyField(Company)\n maxRounds = models.IntegerField(default=10)\n currentRound = models.IntegerField(default=1)\n ordermarket = models.ManyToManyField(Order)\n actionpool = models.ManyToManyField(\"Action\")\n timer = models.ForeignKey(Timer, default=1, on_delete=models.CASCADE)",
  1129. "detail": "mygame.backend.game",
  1130. "documentation": {}
  1131. },
  1132. {
  1133. "label": "WorkerNames",
  1134. "kind": 6,
  1135. "importPath": "mygame.backend.names",
  1136. "description": "mygame.backend.names",
  1137. "peekOfCode": "class WorkerNames(models.Model):\n name = models.CharField(default=\"no name\", max_length=20)\nclass OrderNames(models.Model):\n name = models.CharField(default=\"no name\", max_length=20)",
  1138. "detail": "mygame.backend.names",
  1139. "documentation": {}
  1140. },
  1141. {
  1142. "label": "OrderNames",
  1143. "kind": 6,
  1144. "importPath": "mygame.backend.names",
  1145. "description": "mygame.backend.names",
  1146. "peekOfCode": "class OrderNames(models.Model):\n name = models.CharField(default=\"no name\", max_length=20)",
  1147. "detail": "mygame.backend.names",
  1148. "documentation": {}
  1149. },
  1150. {
  1151. "label": "Offer",
  1152. "kind": 6,
  1153. "importPath": "mygame.backend.offer",
  1154. "description": "mygame.backend.offer",
  1155. "peekOfCode": "class Offer(models.Model):\n company = models.ForeignKey(\"Company\", default=1, on_delete=models.CASCADE)\n amount = models.IntegerField(default=0)\n order = models.ForeignKey(\"Order\", default=1, on_delete=models.CASCADE)\n def offerAcceptedEvent(self):\n name = \"Offer for \" + self.order.name\n description = (\n \"Your offer for the order \"\n + self.order.name\n + \" has been accepted!\"",
  1156. "detail": "mygame.backend.offer",
  1157. "documentation": {}
  1158. },
  1159. {
  1160. "label": "Order",
  1161. "kind": 6,
  1162. "importPath": "mygame.backend.order",
  1163. "description": "mygame.backend.order",
  1164. "peekOfCode": "class Order(models.Model):\n name = models.CharField(default=\"random order\", max_length=20)\n profit = models.IntegerField(default=1000)\n status = models.IntegerField(\n default=0, validators=[MinValueValidator(0), MaxValueValidator(1)]\n )\n maxRounds = models.IntegerField(\n default=5, validators=[MinValueValidator(5), MaxValueValidator(100)]\n )\n requiredWorkload = models.ForeignKey(",
  1165. "detail": "mygame.backend.order",
  1166. "documentation": {}
  1167. },
  1168. {
  1169. "label": "TimerThread",
  1170. "kind": 6,
  1171. "importPath": "mygame.backend.timer",
  1172. "description": "mygame.backend.timer",
  1173. "peekOfCode": "class TimerThread(threading.Thread):\n def __init__(self, timermodel, callback):\n super(TimerThread, self).__init__()\n self.timermodel = timermodel\n self.callback = callback\n def run(self):\n self.timermodel.running = True\n while self.timermodel.remainingtimer >= 0 and self.timermodel.running:\n time.sleep(1)\n self.timermodel.remainingtimer -= 1",
  1174. "detail": "mygame.backend.timer",
  1175. "documentation": {}
  1176. },
  1177. {
  1178. "label": "Timer",
  1179. "kind": 6,
  1180. "importPath": "mygame.backend.timer",
  1181. "description": "mygame.backend.timer",
  1182. "peekOfCode": "class Timer(models.Model):\n timer = models.IntegerField(default=60)\n remainingtimer = models.IntegerField(default=60)\n running = models.BooleanField(default=False)\n def start(self, callback):\n self.thread = TimerThread(self, callback)\n self.thread.start()\n def stop(self):\n self.thread.stop()",
  1183. "detail": "mygame.backend.timer",
  1184. "documentation": {}
  1185. },
  1186. {
  1187. "label": "Worker",
  1188. "kind": 6,
  1189. "importPath": "mygame.backend.worker",
  1190. "description": "mygame.backend.worker",
  1191. "peekOfCode": "class Worker(models.Model):\n name = models.CharField(default=\"random worker\", max_length=20)\n attributes = models.ForeignKey(AttributeSet, default=1, on_delete=models.CASCADE)\n skilledModels = models.ForeignKey(\n EngineeringModel, on_delete=models.CASCADE, blank=True\n )\n amplifyer = models.FloatField(\n default=1, validators=[MinValueValidator(1.0), MaxValueValidator(2.0)]\n )\n salary = models.IntegerField(default=1000)",
  1192. "detail": "mygame.backend.worker",
  1193. "documentation": {}
  1194. },
  1195. {
  1196. "label": "Migration",
  1197. "kind": 6,
  1198. "importPath": "mygame.migrations.0001_initial",
  1199. "description": "mygame.migrations.0001_initial",
  1200. "peekOfCode": "class Migration(migrations.Migration):\n initial = True\n dependencies = [\n ('contenttypes', '0002_remove_content_type_name'),\n ]\n operations = [\n migrations.CreateModel(\n name='Action',\n fields=[\n ('id', models.BigAutoField(auto_created=True, primary_key=True, serialize=False, verbose_name='ID')),",
  1201. "detail": "mygame.migrations.0001_initial",
  1202. "documentation": {}
  1203. },
  1204. {
  1205. "label": "Migration",
  1206. "kind": 6,
  1207. "importPath": "mygame.migrations.0002_game_running",
  1208. "description": "mygame.migrations.0002_game_running",
  1209. "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('mygame', '0001_initial'),\n ]\n operations = [\n migrations.AddField(\n model_name='game',\n name='running',\n field=models.BooleanField(default=False),\n ),",
  1210. "detail": "mygame.migrations.0002_game_running",
  1211. "documentation": {}
  1212. },
  1213. {
  1214. "label": "Migration",
  1215. "kind": 6,
  1216. "importPath": "mygame.migrations.0003_modelheyjoe",
  1217. "description": "mygame.migrations.0003_modelheyjoe",
  1218. "peekOfCode": "class Migration(migrations.Migration):\n dependencies = [\n ('mygame', '0002_game_running'),\n ]\n operations = [\n migrations.CreateModel(\n name='ModelHeyJoe',\n fields=[\n ('engineeringmodel_ptr', models.OneToOneField(auto_created=True, on_delete=django.db.models.deletion.CASCADE, parent_link=True, primary_key=True, serialize=False, to='mygame.engineeringmodel')),\n ],",
  1219. "detail": "mygame.migrations.0003_modelheyjoe",
  1220. "documentation": {}
  1221. },
  1222. {
  1223. "label": "isInstanceOf",
  1224. "kind": 2,
  1225. "importPath": "mygame.templatetags.filters",
  1226. "description": "mygame.templatetags.filters",
  1227. "peekOfCode": "def isInstanceOf(value, classname):\n classobject = eval(classname)\n return isinstance(value, classobject)",
  1228. "detail": "mygame.templatetags.filters",
  1229. "documentation": {}
  1230. },
  1231. {
  1232. "label": "register",
  1233. "kind": 5,
  1234. "importPath": "mygame.templatetags.filters",
  1235. "description": "mygame.templatetags.filters",
  1236. "peekOfCode": "register = template.Library()\n#so kann man isinstance im frontend nutzen \n# (KLASSEN DIE MAN FILTERN WILL IMPORTIEREN)\n@register.filter\ndef isInstanceOf(value, classname):\n classobject = eval(classname)\n return isinstance(value, classobject)",
  1237. "detail": "mygame.templatetags.filters",
  1238. "documentation": {}
  1239. },
  1240. {
  1241. "label": "MygameConfig",
  1242. "kind": 6,
  1243. "importPath": "mygame.apps",
  1244. "description": "mygame.apps",
  1245. "peekOfCode": "class MygameConfig(AppConfig):\n default_auto_field = 'django.db.models.BigAutoField'\n name = 'mygame'",
  1246. "detail": "mygame.apps",
  1247. "documentation": {}
  1248. },
  1249. {
  1250. "label": "TimerConsumer",
  1251. "kind": 6,
  1252. "importPath": "mygame.consumers",
  1253. "description": "mygame.consumers",
  1254. "peekOfCode": "class TimerConsumer(AsyncWebsocketConsumer):\n async def connect(self):\n await self.accept()\n self.gameid = self.scope[\"url_route\"][\"kwargs\"][\"gameid\"]\n self.game = await self.getGame()\n timer = await self.getRemainingTimer()\n await self.send(text_data=str(timer))\n self.timerTask = asyncio.ensure_future(self.timer(timer))\n async def timer(self, timer):\n await asyncio.sleep(1)",
  1255. "detail": "mygame.consumers",
  1256. "documentation": {}
  1257. },
  1258. {
  1259. "label": "LoginForm",
  1260. "kind": 6,
  1261. "importPath": "mygame.forms",
  1262. "description": "mygame.forms",
  1263. "peekOfCode": "class LoginForm(forms.Form):\n username = forms.CharField(\n label=\"Username\", min_length=4, max_length=30, widget=forms.TextInput\n )\n password = forms.CharField(\n label=\"Password\", min_length=4, max_length=30, widget=forms.PasswordInput\n )\n game_id = forms.CharField(label=\"Game ID\", widget=forms.NumberInput)\n create_join_game = forms.ChoiceField(\n label=\"Create/Join Game\",",
  1264. "detail": "mygame.forms",
  1265. "documentation": {}
  1266. },
  1267. {
  1268. "label": "GamesettingsForm",
  1269. "kind": 6,
  1270. "importPath": "mygame.forms",
  1271. "description": "mygame.forms",
  1272. "peekOfCode": "class GamesettingsForm(forms.Form):\n rounds = forms.CharField(label=\"set number of rounds:\", required=False, widget=forms.NumberInput)\n timer = forms.CharField(label=\"set roundtimer:\", required=False, widget=forms.NumberInput)\n ordermarketsize = forms.CharField(label=\"set ordermarket size:\", required=False, widget=forms.NumberInput)",
  1273. "detail": "mygame.forms",
  1274. "documentation": {}
  1275. },
  1276. {
  1277. "label": "InitialDatabase",
  1278. "kind": 6,
  1279. "importPath": "mygame.initialdatabase",
  1280. "description": "mygame.initialdatabase",
  1281. "peekOfCode": "class InitialDatabase:\n # Names generiert von chatgpt https://chat.openai.com/\n # Workernames\n workernames = [\n \"Emma\",\n \"Mia\",\n \"Hannah\",\n \"Emilia\",\n \"Lina\",\n \"Ulma\",",
  1282. "detail": "mygame.initialdatabase",
  1283. "documentation": {}
  1284. },
  1285. {
  1286. "label": "websocket_urlpatterns",
  1287. "kind": 5,
  1288. "importPath": "mygame.routing",
  1289. "description": "mygame.routing",
  1290. "peekOfCode": "websocket_urlpatterns = [\n re_path(r\"^mygame/company/(?P<gameid>\\d+)/$\", consumers.TimerConsumer.as_asgi())\n]",
  1291. "detail": "mygame.routing",
  1292. "documentation": {}
  1293. },
  1294. {
  1295. "label": "urlpatterns",
  1296. "kind": 5,
  1297. "importPath": "mygame.urls",
  1298. "description": "mygame.urls",
  1299. "peekOfCode": "urlpatterns = [\n path(\"\", views.loginView, name=\"loginView\"),\n path(\"lobby/<int:gameid>/<str:username>\", views.lobby, name=\"lobby\"),\n path(\"gamerules/<int:gameid>/\", views.gamerules, name=\"gamerules\"),\n path(\n \"company/<int:gameid>/<str:username>/startGame/\",\n views.startGame,\n name=\"startGame\",\n ),\n path(",
  1300. "detail": "mygame.urls",
  1301. "documentation": {}
  1302. },
  1303. {
  1304. "label": "loginView",
  1305. "kind": 2,
  1306. "importPath": "mygame.views",
  1307. "description": "mygame.views",
  1308. "peekOfCode": "def loginView(request):\n if request.method == \"POST\":\n try:\n form = LoginForm(request.POST)\n if form.is_valid():\n username = form.cleaned_data[\"username\"]\n gameid = form.cleaned_data[\"game_id\"]\n password = form.cleaned_data[\"password\"]\n choice = form.cleaned_data[\"create_join_game\"]\n # Create oder Join angewählt?",
  1309. "detail": "mygame.views",
  1310. "documentation": {}
  1311. },
  1312. {
  1313. "label": "lobby",
  1314. "kind": 2,
  1315. "importPath": "mygame.views",
  1316. "description": "mygame.views",
  1317. "peekOfCode": "def lobby(request, gameid, username):\n game = get_object_or_404(Game, id=gameid)\n if request.method == \"POST\":\n if request.POST.get(\"action\", False) == \"clearlobby\":\n game.clearParticipants(username)\n if request.POST.get(\"action\", False) == \"changesettings\":\n gamesettingsform = GamesettingsForm(\n request.POST,\n initial={\n \"timer\": game.timer.timer,",
  1318. "detail": "mygame.views",
  1319. "documentation": {}
  1320. },
  1321. {
  1322. "label": "gamerules",
  1323. "kind": 2,
  1324. "importPath": "mygame.views",
  1325. "description": "mygame.views",
  1326. "peekOfCode": "def gamerules(request, gameid):\n game = get_object_or_404(Game, id=gameid)\n return render(\n request,\n \"mygame/gamerules.html\",\n {\n \"game\": game,\n },\n )\ndef startGame(request, gameid, username):",
  1327. "detail": "mygame.views",
  1328. "documentation": {}
  1329. },
  1330. {
  1331. "label": "startGame",
  1332. "kind": 2,
  1333. "importPath": "mygame.views",
  1334. "description": "mygame.views",
  1335. "peekOfCode": "def startGame(request, gameid, username):\n game = get_object_or_404(Game, id=gameid)\n game.startGame()\n return redirect(\"company\", gameid=gameid, username=username)\ndef company(request, gameid, username):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n if request.method == \"POST\":\n if request.POST[\"action\"] == \"next round\":\n gameend = game.processGameround()",
  1336. "detail": "mygame.views",
  1337. "documentation": {}
  1338. },
  1339. {
  1340. "label": "company",
  1341. "kind": 2,
  1342. "importPath": "mygame.views",
  1343. "description": "mygame.views",
  1344. "peekOfCode": "def company(request, gameid, username):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n if request.method == \"POST\":\n if request.POST[\"action\"] == \"next round\":\n gameend = game.processGameround()\n if gameend:\n return redirect(\"standings\", gameid=gameid, username=username)\n else:\n eventtuple = company.getEvent(0, \"default\")",
  1345. "detail": "mygame.views",
  1346. "documentation": {}
  1347. },
  1348. {
  1349. "label": "companyWorker",
  1350. "kind": 2,
  1351. "importPath": "mygame.views",
  1352. "description": "mygame.views",
  1353. "peekOfCode": "def companyWorker(request, gameid, username, workerid):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n try:\n viewedworker = Worker.objects.get(id=workerid)\n except:\n return render(\n request,\n \"mygame/company.html\",\n {\"game\": game, \"company\": company},",
  1354. "detail": "mygame.views",
  1355. "documentation": {}
  1356. },
  1357. {
  1358. "label": "companyOrder",
  1359. "kind": 2,
  1360. "importPath": "mygame.views",
  1361. "description": "mygame.views",
  1362. "peekOfCode": "def companyOrder(request, gameid, username, orderid):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n try:\n viewedorder = get_object_or_404(Order, id=orderid)\n except:\n return render(\n request,\n \"mygame/company.html\",\n {\"game\": game, \"company\": company},",
  1363. "detail": "mygame.views",
  1364. "documentation": {}
  1365. },
  1366. {
  1367. "label": "companyTraining",
  1368. "kind": 2,
  1369. "importPath": "mygame.views",
  1370. "description": "mygame.views",
  1371. "peekOfCode": "def companyTraining(request, gameid, username, workerid):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n try:\n trainworker = get_object_or_404(Worker, id=workerid)\n except:\n return render(\n request,\n \"mygame/company.html\",\n {\"game\": game, \"company\": company},",
  1372. "detail": "mygame.views",
  1373. "documentation": {}
  1374. },
  1375. {
  1376. "label": "companyAction",
  1377. "kind": 2,
  1378. "importPath": "mygame.views",
  1379. "description": "mygame.views",
  1380. "peekOfCode": "def companyAction(request, gameid, username, actionid):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n # hier schauen welche action es ist dann aus entsprechender table holen\n try:\n viewedaction = get_object_or_404(Action, id=actionid)\n except:\n return render(\n request,\n \"mygame/company.html\",",
  1381. "detail": "mygame.views",
  1382. "documentation": {}
  1383. },
  1384. {
  1385. "label": "companyEvent",
  1386. "kind": 2,
  1387. "importPath": "mygame.views",
  1388. "description": "mygame.views",
  1389. "peekOfCode": "def companyEvent(request, gameid, username, eventnumber):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n if request.method == \"POST\":\n if request.POST.get(\"action\", False) == \"previous\":\n eventresult = company.getEvent(eventnumber, \"previous\")\n if request.POST.get(\"action\", False) == \"next\":\n eventresult = company.getEvent(eventnumber, \"next\")\n else:\n eventresult = company.getEvent(eventnumber, \"default\")",
  1390. "detail": "mygame.views",
  1391. "documentation": {}
  1392. },
  1393. {
  1394. "label": "companyEventSetModel",
  1395. "kind": 2,
  1396. "importPath": "mygame.views",
  1397. "description": "mygame.views",
  1398. "peekOfCode": "def companyEventSetModel(request, gameid, username, eventid, modelnumber):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n engineeringmodels = EngineeringModel.objects.all()\n if request.method == \"POST\":\n if request.POST.get(\"action\", False) == \"previous\":\n modelnumber -= 1\n if modelnumber < 0:\n modelnumber = engineeringmodels.count() - 1\n engineeringmodel = engineeringmodels[modelnumber]",
  1399. "detail": "mygame.views",
  1400. "documentation": {}
  1401. },
  1402. {
  1403. "label": "companySpecialOrder",
  1404. "kind": 2,
  1405. "importPath": "mygame.views",
  1406. "description": "mygame.views",
  1407. "peekOfCode": "def companySpecialOrder(request, gameid, username, specialorderid):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n if request.method == \"POST\":\n specialorder = SpecialOrder.objects.get(id=specialorderid)\n for order in company.orders.all():\n if order.specialorder.id == specialorderid:\n order = order\n if request.POST.get(\"action\", False) == \"handle\":\n event = specialorder.handle(order=order, company=company, handle=True)",
  1408. "detail": "mygame.views",
  1409. "documentation": {}
  1410. },
  1411. {
  1412. "label": "standings",
  1413. "kind": 2,
  1414. "importPath": "mygame.views",
  1415. "description": "mygame.views",
  1416. "peekOfCode": "def standings(request, gameid, username):\n game = get_object_or_404(Game, id=gameid)\n company = get_object_or_404(Company, user=username)\n leaderboard = game.createLeaderboard()\n return render(\n request,\n \"mygame/standings.html\",\n {\"game\": game, \"company\": company, \"leaderboard\": leaderboard},\n )",
  1417. "detail": "mygame.views",
  1418. "documentation": {}
  1419. },
  1420. {
  1421. "label": "app",
  1422. "kind": 5,
  1423. "importPath": "Webgame.asgi",
  1424. "description": "Webgame.asgi",
  1425. "peekOfCode": "app = get_asgi_application()\nfrom channels.auth import AuthMiddlewareStack\nfrom channels.routing import ProtocolTypeRouter, URLRouter\nfrom channels.security.websocket import AllowedHostsOriginValidator\nfrom channels.routing import ProtocolTypeRouter, URLRouter\nfrom channels.auth import AuthMiddlewareStack\nimport mygame.routing\napplication = ProtocolTypeRouter(\n {\n \"http\": app,",
  1426. "detail": "Webgame.asgi",
  1427. "documentation": {}
  1428. },
  1429. {
  1430. "label": "application",
  1431. "kind": 5,
  1432. "importPath": "Webgame.asgi",
  1433. "description": "Webgame.asgi",
  1434. "peekOfCode": "application = ProtocolTypeRouter(\n {\n \"http\": app,\n \"websocket\": AllowedHostsOriginValidator(\n AuthMiddlewareStack(URLRouter(mygame.routing.websocket_urlpatterns))\n ),\n }\n)",
  1435. "detail": "Webgame.asgi",
  1436. "documentation": {}
  1437. },
  1438. {
  1439. "label": "urlpatterns",
  1440. "kind": 5,
  1441. "importPath": "Webgame.routing",
  1442. "description": "Webgame.routing",
  1443. "peekOfCode": "urlpatterns = [\n # ... andere URLs in deinem Projekt ...\n path(\"mygame/\", include(\"mygame.routing\")),\n]",
  1444. "detail": "Webgame.routing",
  1445. "documentation": {}
  1446. },
  1447. {
  1448. "label": "BASE_DIR",
  1449. "kind": 5,
  1450. "importPath": "Webgame.settings",
  1451. "description": "Webgame.settings",
  1452. "peekOfCode": "BASE_DIR = Path(__file__).resolve().parent.parent\n# Quick-start development settings - unsuitable for production\n# See https://docs.djangoproject.com/en/4.1/howto/deployment/checklist/\n# SECURITY WARNING: keep the secret key used in production secret!\nSECRET_KEY = \"django-insecure-mmfrxsf3o6)_4@caak0h_ldedii4x_(&fhg8b7(hd77bfmlo1#\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = [\"*\"]\n# Application definition\nINSTALLED_APPS = [",
  1453. "detail": "Webgame.settings",
  1454. "documentation": {}
  1455. },
  1456. {
  1457. "label": "SECRET_KEY",
  1458. "kind": 5,
  1459. "importPath": "Webgame.settings",
  1460. "description": "Webgame.settings",
  1461. "peekOfCode": "SECRET_KEY = \"django-insecure-mmfrxsf3o6)_4@caak0h_ldedii4x_(&fhg8b7(hd77bfmlo1#\"\n# SECURITY WARNING: don't run with debug turned on in production!\nDEBUG = True\nALLOWED_HOSTS = [\"*\"]\n# Application definition\nINSTALLED_APPS = [\n \"daphne\",\n \"channels\",\n \"polymorphic\",\n \"django.contrib.admin\",",
  1462. "detail": "Webgame.settings",
  1463. "documentation": {}
  1464. },
  1465. {
  1466. "label": "DEBUG",
  1467. "kind": 5,
  1468. "importPath": "Webgame.settings",
  1469. "description": "Webgame.settings",
  1470. "peekOfCode": "DEBUG = True\nALLOWED_HOSTS = [\"*\"]\n# Application definition\nINSTALLED_APPS = [\n \"daphne\",\n \"channels\",\n \"polymorphic\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",",
  1471. "detail": "Webgame.settings",
  1472. "documentation": {}
  1473. },
  1474. {
  1475. "label": "ALLOWED_HOSTS",
  1476. "kind": 5,
  1477. "importPath": "Webgame.settings",
  1478. "description": "Webgame.settings",
  1479. "peekOfCode": "ALLOWED_HOSTS = [\"*\"]\n# Application definition\nINSTALLED_APPS = [\n \"daphne\",\n \"channels\",\n \"polymorphic\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",",
  1480. "detail": "Webgame.settings",
  1481. "documentation": {}
  1482. },
  1483. {
  1484. "label": "INSTALLED_APPS",
  1485. "kind": 5,
  1486. "importPath": "Webgame.settings",
  1487. "description": "Webgame.settings",
  1488. "peekOfCode": "INSTALLED_APPS = [\n \"daphne\",\n \"channels\",\n \"polymorphic\",\n \"django.contrib.admin\",\n \"django.contrib.auth\",\n \"django.contrib.contenttypes\",\n \"django.contrib.sessions\",\n \"django.contrib.messages\",\n \"django.contrib.staticfiles\",",
  1489. "detail": "Webgame.settings",
  1490. "documentation": {}
  1491. },
  1492. {
  1493. "label": "ASGI_APPLICATION",
  1494. "kind": 5,
  1495. "importPath": "Webgame.settings",
  1496. "description": "Webgame.settings",
  1497. "peekOfCode": "ASGI_APPLICATION = \"Webgame.asgi.application\"\nCHANNEL_LAYERS = {\n \"default\": {\n \"BACKEND\": \"channels.layers.InMemoryChannelLayer\",\n },\n}\nCHANNELS_SETTINGS = {\n \"CHANNELS_WS_PROTOCOL_TIMEOUT\": 5,\n}\nMIDDLEWARE = [",
  1498. "detail": "Webgame.settings",
  1499. "documentation": {}
  1500. },
  1501. {
  1502. "label": "CHANNEL_LAYERS",
  1503. "kind": 5,
  1504. "importPath": "Webgame.settings",
  1505. "description": "Webgame.settings",
  1506. "peekOfCode": "CHANNEL_LAYERS = {\n \"default\": {\n \"BACKEND\": \"channels.layers.InMemoryChannelLayer\",\n },\n}\nCHANNELS_SETTINGS = {\n \"CHANNELS_WS_PROTOCOL_TIMEOUT\": 5,\n}\nMIDDLEWARE = [\n \"django.middleware.security.SecurityMiddleware\",",
  1507. "detail": "Webgame.settings",
  1508. "documentation": {}
  1509. },
  1510. {
  1511. "label": "CHANNELS_SETTINGS",
  1512. "kind": 5,
  1513. "importPath": "Webgame.settings",
  1514. "description": "Webgame.settings",
  1515. "peekOfCode": "CHANNELS_SETTINGS = {\n \"CHANNELS_WS_PROTOCOL_TIMEOUT\": 5,\n}\nMIDDLEWARE = [\n \"django.middleware.security.SecurityMiddleware\",\n \"django.contrib.sessions.middleware.SessionMiddleware\",\n \"django.middleware.common.CommonMiddleware\",\n \"django.middleware.csrf.CsrfViewMiddleware\",\n \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n \"django.contrib.messages.middleware.MessageMiddleware\",",
  1516. "detail": "Webgame.settings",
  1517. "documentation": {}
  1518. },
  1519. {
  1520. "label": "MIDDLEWARE",
  1521. "kind": 5,
  1522. "importPath": "Webgame.settings",
  1523. "description": "Webgame.settings",
  1524. "peekOfCode": "MIDDLEWARE = [\n \"django.middleware.security.SecurityMiddleware\",\n \"django.contrib.sessions.middleware.SessionMiddleware\",\n \"django.middleware.common.CommonMiddleware\",\n \"django.middleware.csrf.CsrfViewMiddleware\",\n \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n \"django.contrib.messages.middleware.MessageMiddleware\",\n \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]\nROOT_URLCONF = \"Webgame.urls\"",
  1525. "detail": "Webgame.settings",
  1526. "documentation": {}
  1527. },
  1528. {
  1529. "label": "ROOT_URLCONF",
  1530. "kind": 5,
  1531. "importPath": "Webgame.settings",
  1532. "description": "Webgame.settings",
  1533. "peekOfCode": "ROOT_URLCONF = \"Webgame.urls\"\nTEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [os.path.join(BASE_DIR, \"templates\")],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",",
  1534. "detail": "Webgame.settings",
  1535. "documentation": {}
  1536. },
  1537. {
  1538. "label": "TEMPLATES",
  1539. "kind": 5,
  1540. "importPath": "Webgame.settings",
  1541. "description": "Webgame.settings",
  1542. "peekOfCode": "TEMPLATES = [\n {\n \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n \"DIRS\": [os.path.join(BASE_DIR, \"templates\")],\n \"APP_DIRS\": True,\n \"OPTIONS\": {\n \"context_processors\": [\n \"django.template.context_processors.debug\",\n \"django.template.context_processors.request\",\n \"django.contrib.auth.context_processors.auth\",",
  1543. "detail": "Webgame.settings",
  1544. "documentation": {}
  1545. },
  1546. {
  1547. "label": "WSGI_APPLICATION",
  1548. "kind": 5,
  1549. "importPath": "Webgame.settings",
  1550. "description": "Webgame.settings",
  1551. "peekOfCode": "WSGI_APPLICATION = \"Webgame.wsgi.application\"\n# Database\n# https://docs.djangoproject.com/en/4.1/ref/settings/#databases\nDATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.sqlite3\",\n \"NAME\": BASE_DIR / \"db.sqlite3\",\n }\n}\n# Password validation",
  1552. "detail": "Webgame.settings",
  1553. "documentation": {}
  1554. },
  1555. {
  1556. "label": "DATABASES",
  1557. "kind": 5,
  1558. "importPath": "Webgame.settings",
  1559. "description": "Webgame.settings",
  1560. "peekOfCode": "DATABASES = {\n \"default\": {\n \"ENGINE\": \"django.db.backends.sqlite3\",\n \"NAME\": BASE_DIR / \"db.sqlite3\",\n }\n}\n# Password validation\n# https://docs.djangoproject.com/en/4.1/ref/settings/#auth-password-validators\nAUTH_PASSWORD_VALIDATORS = [\n {",
  1561. "detail": "Webgame.settings",
  1562. "documentation": {}
  1563. },
  1564. {
  1565. "label": "AUTH_PASSWORD_VALIDATORS",
  1566. "kind": 5,
  1567. "importPath": "Webgame.settings",
  1568. "description": "Webgame.settings",
  1569. "peekOfCode": "AUTH_PASSWORD_VALIDATORS = [\n {\n \"NAME\": \"django.contrib.auth.password_validation.UserAttributeSimilarityValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.MinimumLengthValidator\",\n },\n {\n \"NAME\": \"django.contrib.auth.password_validation.CommonPasswordValidator\",\n },",
  1570. "detail": "Webgame.settings",
  1571. "documentation": {}
  1572. },
  1573. {
  1574. "label": "LANGUAGE_CODE",
  1575. "kind": 5,
  1576. "importPath": "Webgame.settings",
  1577. "description": "Webgame.settings",
  1578. "peekOfCode": "LANGUAGE_CODE = \"en-us\"\nTIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/4.1/howto/static-files/\nSTATIC_URL = \"/static/\"\nSTATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field",
  1579. "detail": "Webgame.settings",
  1580. "documentation": {}
  1581. },
  1582. {
  1583. "label": "TIME_ZONE",
  1584. "kind": 5,
  1585. "importPath": "Webgame.settings",
  1586. "description": "Webgame.settings",
  1587. "peekOfCode": "TIME_ZONE = \"UTC\"\nUSE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/4.1/howto/static-files/\nSTATIC_URL = \"/static/\"\nSTATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1588. "detail": "Webgame.settings",
  1589. "documentation": {}
  1590. },
  1591. {
  1592. "label": "USE_I18N",
  1593. "kind": 5,
  1594. "importPath": "Webgame.settings",
  1595. "description": "Webgame.settings",
  1596. "peekOfCode": "USE_I18N = True\nUSE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/4.1/howto/static-files/\nSTATIC_URL = \"/static/\"\nSTATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1597. "detail": "Webgame.settings",
  1598. "documentation": {}
  1599. },
  1600. {
  1601. "label": "USE_TZ",
  1602. "kind": 5,
  1603. "importPath": "Webgame.settings",
  1604. "description": "Webgame.settings",
  1605. "peekOfCode": "USE_TZ = True\n# Static files (CSS, JavaScript, Images)\n# https://docs.djangoproject.com/en/4.1/howto/static-files/\nSTATIC_URL = \"/static/\"\nSTATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1606. "detail": "Webgame.settings",
  1607. "documentation": {}
  1608. },
  1609. {
  1610. "label": "STATIC_URL",
  1611. "kind": 5,
  1612. "importPath": "Webgame.settings",
  1613. "description": "Webgame.settings",
  1614. "peekOfCode": "STATIC_URL = \"/static/\"\nSTATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1615. "detail": "Webgame.settings",
  1616. "documentation": {}
  1617. },
  1618. {
  1619. "label": "STATIC_ROOT",
  1620. "kind": 5,
  1621. "importPath": "Webgame.settings",
  1622. "description": "Webgame.settings",
  1623. "peekOfCode": "STATIC_ROOT = \"/app/static/\"\n# Default primary key field type\n# https://docs.djangoproject.com/en/4.1/ref/settings/#default-auto-field\nDEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1624. "detail": "Webgame.settings",
  1625. "documentation": {}
  1626. },
  1627. {
  1628. "label": "DEFAULT_AUTO_FIELD",
  1629. "kind": 5,
  1630. "importPath": "Webgame.settings",
  1631. "description": "Webgame.settings",
  1632. "peekOfCode": "DEFAULT_AUTO_FIELD = \"django.db.models.BigAutoField\"",
  1633. "detail": "Webgame.settings",
  1634. "documentation": {}
  1635. },
  1636. {
  1637. "label": "urlpatterns",
  1638. "kind": 5,
  1639. "importPath": "Webgame.urls",
  1640. "description": "Webgame.urls",
  1641. "peekOfCode": "urlpatterns = [\n path(\"admin/\", admin.site.urls),\n path(\"mygame/\", include(\"mygame.urls\")),\n]\nif settings.DEBUG:\n urlpatterns += static(settings.STATIC_URL, document_root=settings.STATIC_ROOT)",
  1642. "detail": "Webgame.urls",
  1643. "documentation": {}
  1644. },
  1645. {
  1646. "label": "application",
  1647. "kind": 5,
  1648. "importPath": "Webgame.wsgi",
  1649. "description": "Webgame.wsgi",
  1650. "peekOfCode": "application = get_wsgi_application()",
  1651. "detail": "Webgame.wsgi",
  1652. "documentation": {}
  1653. },
  1654. {
  1655. "label": "main",
  1656. "kind": 2,
  1657. "importPath": "manage",
  1658. "description": "manage",
  1659. "peekOfCode": "def main():\n \"\"\"Run administrative tasks.\"\"\"\n os.environ.setdefault('DJANGO_SETTINGS_MODULE', 'Webgame.settings')\n try:\n from django.core.management import execute_from_command_line\n except ImportError as exc:\n raise ImportError(\n \"Couldn't import Django. Are you sure it's installed and \"\n \"available on your PYTHONPATH environment variable? Did you \"\n \"forget to activate a virtual environment?\"",
  1660. "detail": "manage",
  1661. "documentation": {}
  1662. }
  1663. ]