initial.json 53.9 KB
Newer Older
Julien Palard's avatar
Julien Palard committed
1
2
3
4
5
[
  {
    "model": "website.user",
    "pk": 1,
    "fields": {
Julien Palard's avatar
Julien Palard committed
6
7
      "password": "pbkdf2_sha256$260000$fwLk6yN8ubsPnRaY4i6ipP$ynV6Hu+UbQMpavAnOgdj+4t0hRn8YvXTNmipNK8uihs=",
      "last_login": "2021-10-03T15:45:09.835Z",
Julien Palard's avatar
Julien Palard committed
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
      "is_superuser": true,
      "username": "mdk",
      "first_name": "",
      "last_name": "",
      "email": "julien@palard.fr",
      "is_staff": true,
      "is_active": true,
      "date_joined": "2020-12-04T12:20:46.277Z",
      "points": 0.3046913079744986,
      "rank": 1,
      "public_profile": true,
      "groups": [],
      "user_permissions": []
    }
  },
  {
    "model": "website.user",
    "pk": 2,
    "fields": {
      "password": "pbkdf2_sha256$216000$AjLgTNgKLucA$YkQW++OFihbJakgBjr4PJ2XmElN0S4zBYBYuXXx/b/8=",
      "last_login": null,
      "is_superuser": false,
      "username": "Lisa",
Julien Palard's avatar
Julien Palard committed
31
32
      "first_name": "Lisa",
      "last_name": "Simpson",
Julien Palard's avatar
Julien Palard committed
33
34
35
      "email": "",
      "is_staff": false,
      "is_active": true,
Julien Palard's avatar
Julien Palard committed
36
37
      "date_joined": "2020-12-04T12:24:09Z",
      "points": 0,
Julien Palard's avatar
Julien Palard committed
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
      "rank": null,
      "public_profile": true,
      "groups": [],
      "user_permissions": []
    }
  },
  {
    "model": "website.page",
    "pk": 1,
    "fields": {
      "slug": "exercises",
      "title": "Exercises",
      "title_en": "Exercises",
      "title_fr": "Exercices",
      "body": "",
      "body_en": "",
      "body_fr": "",
Julien Palard's avatar
Julien Palard committed
55
      "position": 0,
Julien Palard's avatar
Julien Palard committed
56
57
58
59
60
61
62
63
64
65
66
67
68
69
      "in_menu": true
    }
  },
  {
    "model": "website.page",
    "pk": 2,
    "fields": {
      "slug": "about",
      "title": "About",
      "title_en": "About",
      "title_fr": "À propos",
      "body": "# About Hackinscience\r\n\r\n## Hackinscience, the online platform\r\n\r\nThe Hackinscience platform is a free, without ads, and open-source\r\n([repo on framagit](https://framagit.org/hackinscience/\">repo on framagit))\r\nexercise platform, by a [team](/page/team) of Python passionates.\r\n\r\nWe only rely on [your donations](/page/sponsor) to run this.\r\n\r\n\r\n## You're a teacher?\r\n\r\nIf you're a teacher and want to use HackInScience during your courses,\r\ndon't hesitate to tell us by email at team at hackinscience dot org, we can\r\nhelp (make your team private, add needed features, ...).\r\n\r\n\r\n## You'd like The HackInScience Team for a class?\r\n\r\nGood news, we teach Python too! Both in schools and companies, don't hesitate\r\nto drop us an email at team at hackinscience dot org and we'll discuss about it.\r\nWe're based in Paris, France, but it may be OK for the team to move in other\r\nplaces, or do it remotely, let's talk about it!\r\n\r\n\r\n## Friendly Tracebacks in corrections\r\n\r\nYou may have spotted Python exceptions are often nicely explained, how\r\ndo we do that?\r\n\r\nWe're using André Roberge's\r\n[friendly-traceback](https://github.com/aroberge/friendly-traceback/),\r\na project which tries to understand what caused the exception, and\r\nexplain it.\r\n\r\nIf you spot an exception that is not explained by\r\n`friendly-traceback`, which end up with \"You might want to report this\r\ncase to ...\", don't hesitate to report the case to the given link,\r\nAndré is always very fast to implement the case and it will help many\r\npeople, not only HackInScience users!\r\n\r\nIn the other hand if you spot a correction message that is not\r\nhelpfull and does not give a link to `friendly-traceback`, please open\r\nan issue on [hackinscience](framagit.org/hackinscience/hkis-website)'s\r\nissue tracker, as it's probably to be enhanced in our side.\r\n\r\n\r\n## Privacy\r\n\r\n### Personal informations\r\n\r\nWhen registering and using the HackInScience platform, we store some\r\ninformations about you:\r\n\r\n- Your username, maybe your email if you gave it at registration time.\r\n- All the exercises you did, when you did them, what you submitted, what the bot answered.\r\n\r\nWhy do we store all your submissions?\r\n\r\n- To display ✓ and ✗ marks near exercises so you know which one you\r\n  succeeded and which one to do.\r\n- So you can find them back tomorrow.\r\n- To compute some statistics to spot which exercises are too hard to order them better or\r\n  introduce intermediate/easier ones.\r\n\r\nIf you want to correct an information we've got about you, delete\r\nit, or if you'd like all the data about you conveniently archived for\r\noffline reading, feel free to send a mail to *team at hackinscience dot org*\r\nor ask any member of [the team](/page/team).\r\n\r\n\r\n### Trackers, external analytics tools, advertising\r\n\r\nWe do not use any trackers, nor any advertising network, all our `css`\r\nand `js` are hosted by ourself (no CDN).\r\n\r\nIf you read this, you probably don't like being tracked, there's two\r\ncomplementary things you can do:\r\n\r\n- Enable the \"Do Not Track\" flag in your browser.\r\n- Install the [Privacy Badger](https://fr.wikipedia.org/wiki/Privacy_Badger) browser\r\n  extension from the [Electronic Frontier\r\n  Foundation](https://fr.wikipedia.org/wiki/Electronic_Frontier_Foundation).\r\n\r\nPrivacy Badger blocks advertisements and tracking cookies that do not respect the\r\nDo Not Track setting in a user's web browser.",
      "body_en": "# About Hackinscience\r\n\r\n## Hackinscience, the online platform\r\n\r\nThe Hackinscience platform is a free, without ads, and open-source\r\n([repo on framagit](https://framagit.org/hackinscience/\">repo on framagit))\r\nexercise platform, by a [team](/page/team) of Python passionates.\r\n\r\nWe only rely on [your donations](/page/sponsor) to run this.\r\n\r\n\r\n## You're a teacher?\r\n\r\nIf you're a teacher and want to use HackInScience during your courses,\r\ndon't hesitate to tell us by email at team at hackinscience dot org, we can\r\nhelp (make your team private, add needed features, ...).\r\n\r\n\r\n## You'd like The HackInScience Team for a class?\r\n\r\nGood news, we teach Python too! Both in schools and companies, don't hesitate\r\nto drop us an email at team at hackinscience dot org and we'll discuss about it.\r\nWe're based in Paris, France, but it may be OK for the team to move in other\r\nplaces, or do it remotely, let's talk about it!\r\n\r\n\r\n## Friendly Tracebacks in corrections\r\n\r\nYou may have spotted Python exceptions are often nicely explained, how\r\ndo we do that?\r\n\r\nWe're using André Roberge's\r\n[friendly-traceback](https://github.com/aroberge/friendly-traceback/),\r\na project which tries to understand what caused the exception, and\r\nexplain it.\r\n\r\nIf you spot an exception that is not explained by\r\n`friendly-traceback`, which end up with \"You might want to report this\r\ncase to ...\", don't hesitate to report the case to the given link,\r\nAndré is always very fast to implement the case and it will help many\r\npeople, not only HackInScience users!\r\n\r\nIn the other hand if you spot a correction message that is not\r\nhelpfull and does not give a link to `friendly-traceback`, please open\r\nan issue on [hackinscience](framagit.org/hackinscience/hkis-website)'s\r\nissue tracker, as it's probably to be enhanced in our side.\r\n\r\n\r\n## Privacy\r\n\r\n### Personal informations\r\n\r\nWhen registering and using the HackInScience platform, we store some\r\ninformations about you:\r\n\r\n- Your username, maybe your email if you gave it at registration time.\r\n- All the exercises you did, when you did them, what you submitted, what the bot answered.\r\n\r\nWhy do we store all your submissions?\r\n\r\n- To display ✓ and ✗ marks near exercises so you know which one you\r\n  succeeded and which one to do.\r\n- So you can find them back tomorrow.\r\n- To compute some statistics to spot which exercises are too hard to order them better or\r\n  introduce intermediate/easier ones.\r\n\r\nIf you want to correct an information we've got about you, delete\r\nit, or if you'd like all the data about you conveniently archived for\r\noffline reading, feel free to send a mail to *team at hackinscience dot org*\r\nor ask any member of [the team](/page/team).\r\n\r\n\r\n### Trackers, external analytics tools, advertising\r\n\r\nWe do not use any trackers, nor any advertising network, all our `css`\r\nand `js` are hosted by ourself (no CDN).\r\n\r\nIf you read this, you probably don't like being tracked, there's two\r\ncomplementary things you can do:\r\n\r\n- Enable the \"Do Not Track\" flag in your browser.\r\n- Install the [Privacy Badger](https://fr.wikipedia.org/wiki/Privacy_Badger) browser\r\n  extension from the [Electronic Frontier\r\n  Foundation](https://fr.wikipedia.org/wiki/Electronic_Frontier_Foundation).\r\n\r\nPrivacy Badger blocks advertisements and tracking cookies that do not respect the\r\nDo Not Track setting in a user's web browser.",
      "body_fr": "# À propos de Hackinscience\r\n\r\n## Hackinscience, la plateforme en ligne\r\n\r\nLa plateforme HackInScience est une plateforme d'entrainement libre,\r\nsans publicité et open-source (dépôt sur framagit), par une équipe de passionnés du langage Python.\r\n\r\nNous comptons uniquement sur vos dons pour maintenir ce site.\r\n\r\n\r\n## Vous êtes un·e professeur·e ?\r\n\r\nSi vous êtes un·e professeur·e et que vous souhaitez utiliser HackInScience\r\npendant vos cours, vous pouvez nous en parler, par mail, à team at hackinscience\r\npoint org, nous pourrons passer votre équipe \"privée\", ou discuter des\r\nfonctionalités qui vous manquent.\r\n\r\n\r\n## Vous aimeriez avoir l'équipe HackInScience pour un cours ?\r\n\r\nBonne nouvelle, nous enseignons aussi le Python !\r\nN'hésitez pas à nous laisser un mail à team at hackinscience point org et nous\r\npourrons en discuter. Nous sommes basés à Paris, en France, mais il est\r\npeut-être possible pour l'équipe de se déplacer dans d'autres lieux, ou de\r\nle faire à distance. Parlons-en !\r\n\r\n\r\n## Explications améliorées dans les corrections\r\n\r\nVous avez peut-être remarqué que les exceptions Python trouvées sont souvent\r\nbien expliquées, comment faisons-nous ?\r\n\r\nNous utilisons `friendly-traceback` d'André Roberge,\r\nun projet qui essayes de comprendre ce qui a causé une exception,\r\net de l'expliquer.\r\n\r\nSi vous découvrez une exception non expliquée par friendly-traceback, qui finit\r\npar \"You might want to report this case to ...\",\r\nn'hésitez pas à rapporter le cas via le lien donné, André est toujours prompt\r\nà ajouter ce cas précis et cela aidera beaucoup d'autres personnes,\r\npas seulement les utilisateurs de HackInScience !\r\n\r\nPar ailleurs, si vous découvrez un message de correction qui n'aide pas vraiment\r\net ne fournit pas de lien vers friendly-traceback, merci d'ouvrir un ticket sur\r\nnotre gestionnaire de tickets, étant donné qu'il s'agit certainement d'une\r\namélioration à faire de notre côté.\r\n\r\n\r\n# Vie privée\r\n\r\n## Informations personnelles\r\n\r\nQuand vous vous enregistrez et utilisez la plateforme HackInScience,\r\nnous conservons certaines informations :\r\n\r\n- Votre nom d'utilisateur, et votre adresse mail si vous l'avez fournie à l'inscription.\r\n- Tous les exercices que vous faites, quand vous les faites, ce que vous avez soumis, et ce que le robot a répondu.\r\n\r\nPourquoi stockons-nous toutes les soumissions ?\r\n\r\n- Afin d'afficher les signes ✓ et ✗ prêt des exercices, afin de vous indiquer lesquels vous avez réussi et ceux encore à faire.\r\n- Afin que vous puissiez les retrouver plus tard.\r\n- Pour calculer des statistiques afin de voir quels exercices sont trop durs pour mieux les réordonner ou en ajouter des intermédiaires.\r\n\r\nSi vous souhaitez corriger une information stockée sur vous, la supprimer, ou bien encore récupérer l'ensemble de vos données, envoyez un mail à \"team at hackinscience point org\" ou demandez à un membre de l'équipe.\r\n\r\n\r\n## Trackers, outils d'analyse externes, publicité\r\n\r\nNous n'utilisons pas de tracker, ni de réseau de publicité,\r\ntous nos fichiers css et javascript sont hébergés en interne (pas de CDN).\r\n\r\nSi vous lisez ceci, vous n'aimez probablement pas être tracé,\r\nil y a deux choses supplémentaires que vous pouvez faire :\r\n\r\n- Activer l'option \"Do Not Track\" de votre navigateur\r\n- Installer l'extension de navigateur Privacy Badger de l'Electronic Frontier Foundation.\r\n\r\nPrivacy Badger bloque les publicités et les cookies de traçage qui ne respectent pas l'option\r\nDo Not Track.",
Julien Palard's avatar
Julien Palard committed
70
      "position": 1,
Julien Palard's avatar
Julien Palard committed
71
72
73
74
75
76
77
78
79
80
81
82
83
84
      "in_menu": true
    }
  },
  {
    "model": "website.page",
    "pk": 3,
    "fields": {
      "slug": "team",
      "title": "The Team",
      "title_en": "The Team",
      "title_fr": "L'équipe",
      "body": "# The HackInScience Team\r\n\r\n<div class=\"row\">\r\n  <div class=\"col\">\r\n    <h4>Antoine Angot</h4>\r\n    <img src=\"https://mdk.fr/antoine-angot.jpg\">\r\n    <p> Former CS teacher at FdV Licence, <a href=\"https://lean.fr\">lean.fr</a>.</p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Antoine Mazières</h4>\r\n    <img src=\"https://mdk.fr/antoine-mazieres.jpg\">\r\n    <p>\r\n      Postdoctoral Researcher at Centre Marc Bloch, <a href=\"https://antonomase.fr/\">antonomase.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Julien Palard</h4>\r\n    <img src=\"https://mdk.fr/julien-palard.jpg\">\r\n    <p>\r\n      CPython core developer, independent Python trainer, <a href=\"https://mdk.fr\">mdk.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Jérôme Schneider</h4>\r\n    <img src=\"https://mdk.frjerome-schneider.jpg\">\r\n    <p>Profesionnal Python programmer with 10+ years of experience.</p>\r\n  </div>\r\n</div>\r\n\r\n## Contact us\r\n\r\nYou can contact us by email at team at hackinscience dot org.",
      "body_en": "# The HackInScience Team\r\n\r\n<div class=\"row\">\r\n  <div class=\"col\">\r\n    <h4>Antoine Angot</h4>\r\n    <img src=\"https://mdk.fr/antoine-angot.jpg\">\r\n    <p> Former CS teacher at FdV Licence, <a href=\"https://lean.fr\">lean.fr</a>.</p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Antoine Mazières</h4>\r\n    <img src=\"https://mdk.fr/antoine-mazieres.jpg\">\r\n    <p>\r\n      Postdoctoral Researcher at Centre Marc Bloch, <a href=\"https://antonomase.fr/\">antonomase.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Julien Palard</h4>\r\n    <img src=\"https://mdk.fr/julien-palard.jpg\">\r\n    <p>\r\n      CPython core developer, independent Python trainer, <a href=\"https://mdk.fr\">mdk.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Jérôme Schneider</h4>\r\n    <img src=\"https://mdk.frjerome-schneider.jpg\">\r\n    <p>Profesionnal Python programmer with 10+ years of experience.</p>\r\n  </div>\r\n</div>\r\n\r\n## Contact us\r\n\r\nYou can contact us by email at team at hackinscience dot org.",
      "body_fr": "# L'équipe HackInScience\r\n\r\n<div class=\"row\">\r\n  <div class=\"col\">\r\n    <h4>Antoine Angot</h4>\r\n    <img src=\"https://mdk.fr/antoine-angot.jpg\">\r\n    <p>Ancien enseignant informatique dans la licence FdV, <a href=\"https://lean.fr\">lean.fr</a>.</p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Antoine Mazières</h4>\r\n    <img src=\"https://mdk.fr/antoine-mazieres.jpg\">\r\n    <p>\r\n      Chercheur post-doc au centre Marc Bloch, <a href=\"https://antonomase.fr/\">antonomase.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Julien Palard</h4>\r\n    <img src=\"https://mdk.fr/julien-palard.jpg\">\r\n    <p>\r\n      CPython core dev, formateur Python indépendant, <a href=\"https://mdk.fr\">mdk.fr</a>.\r\n    </p>\r\n  </div>\r\n  <div class=\"col\">\r\n    <h4>Jérôme Schneider</h4>\r\n    <img src=\"https://mdk.frjerome-schneider.jpg\">\r\n    <p>Développeur Python profesionnal, +15 ans d'expérience.</p>\r\n  </div>\r\n</div>\r\n\r\n## Contact us\r\n\r\nYou can contact us by email at team at hackinscience dot org.",
Julien Palard's avatar
Julien Palard committed
85
      "position": 0,
Julien Palard's avatar
Julien Palard committed
86
87
88
89
90
91
92
93
94
95
96
97
98
99
      "in_menu": false
    }
  },
  {
    "model": "website.page",
    "pk": 4,
    "fields": {
      "slug": "sponsor",
      "title": "Sponsor",
      "title_en": "Sponsor",
      "title_fr": "Soutenir",
      "body": "# Spororing HackInScience\r\n\r\nHackinscience is a free, open source, and ad-less Python learning platform which\r\nruns exclusively on your donations.\r\n\r\n## Donate via Github\r\n\r\nYou can [sponsor me on Github](https://github.com/sponsors/JulienPalard/), and\r\nchoose between multiple tiers, some of them just giving me more time to work on\r\nHackInScience, some other will provide your with one-to-one video chat with me.\r\n\r\n\r\n## Donate via Liberapay\r\n\r\nIf you just want to help, but stay anonymous, you can donate on\r\n[liberapay/JulienPalard](https://liberapay.com/JulienPalard),\r\nit's a good way to say \"thank you\" while providing me with incentive and\r\nmotivation to keep focused on open source software in general,\r\nincluding HackInScience.\r\n\r\n\r\n## Donate via Paypal\r\n\r\nIf it's easier for you, I also have a Paypal account:\r\n[paypal.me/JulienPalard](https://paypal.me/JulienPalard).",
      "body_en": "# Spororing HackInScience\r\n\r\nHackinscience is a free, open source, and ad-less Python learning platform which\r\nruns exclusively on your donations.\r\n\r\n## Donate via Github\r\n\r\nYou can [sponsor me on Github](https://github.com/sponsors/JulienPalard/), and\r\nchoose between multiple tiers, some of them just giving me more time to work on\r\nHackInScience, some other will provide your with one-to-one video chat with me.\r\n\r\n\r\n## Donate via Liberapay\r\n\r\nIf you just want to help, but stay anonymous, you can donate on\r\n[liberapay/JulienPalard](https://liberapay.com/JulienPalard),\r\nit's a good way to say \"thank you\" while providing me with incentive and\r\nmotivation to keep focused on open source software in general,\r\nincluding HackInScience.\r\n\r\n\r\n## Donate via Paypal\r\n\r\nIf it's easier for you, I also have a Paypal account:\r\n[paypal.me/JulienPalard](https://paypal.me/JulienPalard).",
      "body_fr": "# Soutenir HackInScience\r\n\r\nHackInScience est gratuit, open source, sans pubs et sans trackers,\r\nil fonctionne donc uniquement grace à vos dons.\r\n\r\nSi vous avez appris quelque chose, ou carrément trouvé un job, grâce à\r\nHackInScience, n'hésitez pas à nous faire un petit don : ça nous permettra\r\nde rédiger plus d'exercices, et de peaufiner les moulinettes actuelles pour les\r\nprochains participants.\r\n\r\n\r\n## Donner via Github\r\n\r\nVous pouvez [me parrainer sur Github](https://github.com/sponsors/JulienPalard/).\r\nSur Github vous pouvez choisir différents niveaux de dons,\r\ncertains me permettent simplement de passer plus de temps à améliorer HackInScience,\r\nd'autres vous donnent la possibilité de discuter avec moi sur le sujet de votre choix.\r\n\r\n\r\n# Donner via Liberapay\r\n\r\nSi vous voulez juste aider ou dire merci, tout en restant anonyme,\r\nvous pouvez donner sur [liberapay/JulienPalard](https://liberapay.com/JulienPalard).\r\n\r\nC'est un bon moyen de me motiver à continuer le travail sur HackInScience et l'open source en général.\r\n\r\n\r\n# Donner via Paypal\r\n\r\nJ'ai aussi un Paypal pour ceux que ça arrange :\r\n[paypal.me/JulienPalard](https://paypal.me/JulienPalard).",
Julien Palard's avatar
Julien Palard committed
100
      "position": 0,
Julien Palard's avatar
Julien Palard committed
101
102
103
      "in_menu": false
    }
  },
Julien Palard's avatar
Julien Palard committed
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
  {
    "model": "website.page",
    "pk": 5,
    "fields": {
      "slug": "help",
      "title": "Help",
      "title_en": "Help",
      "title_fr": "Aide",
      "body": "# Getting help\r\n\r\n## Report a bug on hackinscience\r\n\r\nIf you found an issue in an exercise, or the website, please either:\r\n\r\n- Fill a bug [in our bugtracker](https://framagit.org/hackinscience/hkis-website/issues).\r\n- Send me an email: [julien@palard.fr](mailto:julien@palard.fr).\r\n\r\n\r\n## Get personal coaching\r\n\r\nSee the [sponsor](/page/sponsor) page.\r\n\r\n\r\n## Get help from the Python community\r\n\r\nThe Python community is known to be friendly and welcoming, don't\r\nhesitate to ask for help!\r\n\r\n\r\n### Asking on a forum\r\n\r\nThere's a Python forum at\r\n[discuss.python.org](https://discuss.python.org), feel free to ask\r\nyour question in the `Users` category.\r\n\r\n\r\n### Asking in the chat\r\n\r\nYou can ask in the `#python` channel of freenode, you can use\r\n[https://kiwi.freenode.net](https://kiwi.freenode.net) if you don't\r\nhave an IRC client.\r\n\r\n\r\n### Asking by mail\r\n\r\nThere's the\r\n[python-list](https://mail.python.org/mailman/listinfo/python-list)\r\nmailing list.\r\n\r\n\r\n### How to ask a question?\r\n\r\nDon't ask to ask, just ask.\r\n\r\nBe polite and respectfull.\r\n\r\nDon't ask for someone else to solve your exercise for you, it won't\r\nhelp you learn.\r\n\r\n<a id=FAQ /><h2>Frequently Asked Questions</h2>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">Can't connect to correction server?</h4>\r\n  <p class=\"card-text\">\r\nIf you have the correction server connection error, there's two main possibilities:\r\n\r\nEither your internet provider (or VPN, or ...) blocks\r\n[WebSockets](https://fr.wikipedia.org/wiki/WebSocket), in which case\r\nyou should politely ask for them to update their blocking policy.\r\n\r\nOr my server is down (in which case you should not even be able to\r\nread this message).\r\n\r\nAnyway don't hesitate to open [an\r\nissue](https://framagit.org/hackinscience/hkis-website/issues) in the\r\nbug tracker, so I know.\r\n\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">My question is not in the FAQ, how to add it?</h4>\r\n  <p class=\"card-text\">\r\nAsk me, I'll reply, and if it's frequently asked, I'll add it here.\r\n\r\nYou can ask me using by opening [an issue](https://framagit.org/hackinscience/hkis-website/issues),\r\nor send me an email: [julien@palard.fr](mailto:julien@palard.fr).\r\n\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<a id=teams />\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">How do team works?</h4>\r\n  <p class=\"card-text\">\r\nTeams are named groups that have their own leaderboard.\r\n\r\nAnyone can create a team at any moment, and leave a team at any\r\nmoment, but:\r\n\r\n- Joining a non-existing team creates it, you become the team staff,\r\n  you and only you can now grant new members in the team.\r\n\r\n- Joining an existing team marks you as willing to join, you'll\r\n  have to wait for the team staff to accept you in.\r\n\r\nBy default a team is public, shoot me an email if you need a private team.\r\n    </p>\r\n  </div>\r\n</div>",
      "body_en": "# Getting help\r\n\r\n## Report a bug on hackinscience\r\n\r\nIf you found an issue in an exercise, or the website, please either:\r\n\r\n- Fill a bug [in our bugtracker](https://framagit.org/hackinscience/hkis-website/issues).\r\n- Send me an email: [julien@palard.fr](mailto:julien@palard.fr).\r\n\r\n\r\n## Get personal coaching\r\n\r\nSee the [sponsor](/page/sponsor) page.\r\n\r\n\r\n## Get help from the Python community\r\n\r\nThe Python community is known to be friendly and welcoming, don't\r\nhesitate to ask for help!\r\n\r\n\r\n### Asking on a forum\r\n\r\nThere's a Python forum at\r\n[discuss.python.org](https://discuss.python.org), feel free to ask\r\nyour question in the `Users` category.\r\n\r\n\r\n### Asking in the chat\r\n\r\nYou can ask in the `#python` channel of freenode, you can use\r\n[https://kiwi.freenode.net](https://kiwi.freenode.net) if you don't\r\nhave an IRC client.\r\n\r\n\r\n### Asking by mail\r\n\r\nThere's the\r\n[python-list](https://mail.python.org/mailman/listinfo/python-list)\r\nmailing list.\r\n\r\n\r\n### How to ask a question?\r\n\r\nDon't ask to ask, just ask.\r\n\r\nBe polite and respectfull.\r\n\r\nDon't ask for someone else to solve your exercise for you, it won't\r\nhelp you learn.\r\n\r\n<a id=FAQ /><h2>Frequently Asked Questions</h2>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">Can't connect to correction server?</h4>\r\n  <p class=\"card-text\">\r\nIf you have the correction server connection error, there's two main possibilities:\r\n\r\nEither your internet provider (or VPN, or ...) blocks\r\n[WebSockets](https://fr.wikipedia.org/wiki/WebSocket), in which case\r\nyou should politely ask for them to update their blocking policy.\r\n\r\nOr my server is down (in which case you should not even be able to\r\nread this message).\r\n\r\nAnyway don't hesitate to open [an\r\nissue](https://framagit.org/hackinscience/hkis-website/issues) in the\r\nbug tracker, so I know.\r\n\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">My question is not in the FAQ, how to add it?</h4>\r\n  <p class=\"card-text\">\r\nAsk me, I'll reply, and if it's frequently asked, I'll add it here.\r\n\r\nYou can ask me using by opening [an issue](https://framagit.org/hackinscience/hkis-website/issues),\r\nor send me an email: [julien@palard.fr](mailto:julien@palard.fr).\r\n\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<a id=teams />\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">How do team works?</h4>\r\n  <p class=\"card-text\">\r\nTeams are named groups that have their own leaderboard.\r\n\r\nAnyone can create a team at any moment, and leave a team at any\r\nmoment, but:\r\n\r\n- Joining a non-existing team creates it, you become the team staff,\r\n  you and only you can now grant new members in the team.\r\n\r\n- Joining an existing team marks you as willing to join, you'll\r\n  have to wait for the team staff to accept you in.\r\n\r\nBy default a team is public, shoot me an email if you need a private team.\r\n    </p>\r\n  </div>\r\n</div>",
      "body_fr": "# Obtenir de l'aide\r\n\r\n## Signaler un bug trouvé sur HackInScience\r\n\r\nSi vous avez trouvé un bug sur le site, dans la moulinette de correction, ou\r\nn'importe où, vous pouvez soit :\r\n\r\n- Ouvrir [un ticket](https://framagit.org/hackinscience/hkis-website/\r\nissues).\r\n- M'en parler directement, je suis `mdk` sur [discuss.afpy.org](https://\r\ndiscuss.afpy.org), et sur freenode, ou par mail : [julien@palard.fr](mailto:\r\njulien@palard.fr).\r\n\r\n\r\n## Avoir l'auteur d'Hackinscience comme prof\r\n\r\nJ'enseigne aussi le Python en temps que formateur indépendant,\r\non peut en parler : [julien@palard.fr](mailto:julien@palard.fr).\r\n\r\n\r\n## Obtenir de l'aide de la communauté Python\r\n\r\nLa communauté Python est réputée pour être amicale et bienveillante,\r\nn'hésitez pas à demander de l'aide !\r\n\r\n### Demander sur un forum\r\n\r\nL'association Francophone Python, l'AFPy, a un forum :\r\n[discuss.afpy.org](https://discuss.afpy.org), n'hésitez pas à utiliser\r\nla catégorie \"Entraide\".\r\n\r\n\r\n### Demander sur un chat\r\n\r\nVous pouvez demander de l'aide sur freenode (IRC), sur le salon `#python-fr`.\r\n\r\nSi vous n'avez pas de client IRC, utilisez: [https://kiwi.freenode.net]\r\n(https://kiwi.freenode.net).\r\n\r\n\r\n### Comment poser une question ?\r\n\r\nSoyez poli et respectueux.\r\n\r\nNe demandez pas l'autorisation de poser une question, posez votre question\r\ndirectement.\r\n\r\nNe demandez pas à ce que quelqu'un fasse votre exercice pour vous, ce\r\nn'est pas une bonne manière d'apprendre.\r\n\r\n\r\n\r\n<a id=FAQ /><h2>Foire Aux Questions</h2>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">Connexion au serveur de correction impossible ?</h4>\r\n  <p class=\"card-text\">\r\nSi votre navigateur ne parvient pas à se connecter au serveur de\r\ncorrection, j'y voit deux raisons possibles :\r\n\r\nSoit votre fournisseur d'accès internet (ou votre VPN) bloque les\r\n[WebSockets](https://fr.wikipedia.org/wiki/WebSocket), auquel cas vous\r\npouvez peut être leur demander de mettre à jour leur politique de\r\nblocage.\r\n\r\nSoit mon serveur est en carafe (mais alors, comment lisez-vous ce\r\nmessage ?).\r\n\r\nDans tous les cas, dites le moi (ouvrez [un\r\nticket](https://framagit.org/hackinscience/hkis-website/issues)), que\r\nje le sache.\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">Ma question n'est pas dans la FAQ, comment l'ajouter ?</h4>\r\n  <p class=\"card-text\">\r\nDemandez moi ! J'y répondrai personnellement, et si la question revient\r\nfréquement, je l'ajouterai ici.\r\n\r\nVous pouvez me demander en ouvrant [un ticket](https://framagit.org/\r\nhackinscience/hkis-website/issues),\r\nou en m'envoyant un mail : [julien@palard.fr](mailto:julien@palard.fr).\r\n    </p>\r\n  </div>\r\n</div>\r\n\r\n<a id=teams />\r\n<div class=\"card mb-3\">\r\n  <div class=\"card-body\">\r\n  <h4 class=\"card-title\">Comment fonctionne la notion d'équipes dans HackInScience ?</h4>\r\n  <p class=\"card-text\">\r\nLes équipes sont des groupes nommés ayant leur propre classement.\r\n\r\nN'importe qui peut créer une équipe à n'importe quel moment, ainsi que quitter l'équipe,\r\nà n'importe quel moment, cependant :\r\n\r\n- Rejoindre une équipe qui n'existe pas revient à la créer : vous devenez ainsi le chef de l'équipe,\r\n  vous, et seulement vous pouvez accepter de nouveaux membres dans l'équipe.\r\n\r\n- Rejoindre une équipe existante vous met « en attente », seul le chef d'équipe peut\r\n  vous y accepter.\r\n\r\nPar défaut, une équipe est publique. Envoyez moi un message si vous voulez cacher votre équipe.\r\n    </p>\r\n  </div>\r\n</div>",
      "position": 2,
      "in_menu": true
    }
  },
Julien Palard's avatar
Julien Palard committed
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
  {
    "model": "website.exercise",
    "pk": 1,
    "fields": {
      "title": "Hello World",
      "title_en": "Hello World",
      "title_fr": "Hello World",
      "author": 2,
      "slug": "hello-world",
      "pre_check": "# AUTO GENERATED: DO NOT EDIT.\r\nfrom pathlib import Path\r\nimport base64\r\nimport lzma\r\nfrom subprocess import run\r\n\r\npo = base64.b64decode(b'/Td6WFoAAATm1rRGAgAhAQwAAACPmEGc4ByhCXhdABGIBuZZS2Lv9pO3+h2zJrFBf1PExg91tvkF8KW3sBEr1MmmaOthrw+R+WF5NgPKknfxhe2MBM5CYnGw2X/s92awmySDmn27JRRRK1ghHbzMtXU/XhzZejCuxGClusFjwvW4v2tEvSvBunSLkhECZULVmn+pnVZp6Ay33Jje23hGt0kM9KUzdu40X7EEKrycUMJIcJrAYK6m0j7ZcMpDSFJ0dRHCel+pbEve76e+FCBNrLrRc5u0gvKt8Xqbvc0BmKeiEgXJxrCA4n5vWM+2rwAtcYphYmvXdOmyhJcRM3IpM+IWDbfbhuui9MeoB4Q2lraslvwHTRUt/rzV2G95AEt8XMG3qalQalmhZXwnd+XijznN77vj58/qsiQUCA6iTazehlHReY+epAKD98B++ejuy+ZMm9m/nPR8wM7YgPkxlekO58WTPXBLjb0NyAhN6MzAIuXzZVnd/4FSsMUJZfZmB86YghLwxdofkraNzDibzoyWIcC7qm38v/HnC3IYtt1T46T4zTwq4mBwjAgAETWstTpw7AEVi23wsXoWSh7GLFWSU4R4d8lCmfr99xBLE0yCQnet+QVOmHZtB6SI5cHGza3tpdqYQdJXYOfDbBWRvwgaprvO/7jjPaWsWn7NCftvdcRleuY6Zv4H0Z2IKHeHdGlKNSFp+QYO94UrNn/7QSXgsCg4OKPKlwk2rtnSKteY/oaKRBlQ9YEDW787Ar5JY0w1Bf+7JqZvVpo+3js4DQIVk4It9mHCVng+vWTFaMssAAuMInQtxy8hQXcmBJjqxru7cwty8T9fhCjSYTvmub96ttImmnsHqEdAlcrEtBDX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dXCk4lGpAIAnHpq+XDMQ6GM8ps2miaXJF0KP6wmgiLHLpqjKb+YVG6l8W1Hj79YslHLnQJeC2Bsuy8j0PsuNE9nujC73eundJkj9U8T9Um97hPd7LYoPAJGLcqc6tIitRTKqIFMN/AIcBtcss3oTlu92bfX57EDV58vVvxbb70I7JXw6TXTue7oo8Q93K1pA3u2hybWJ2gYvCcT7dJW43OThG3WhbekhDo3WLQD7SK0ekgACTDSFMUIrraQABlBOiOQAAS2I6rrHEZ/sCAAAAAARZWg==')\r\npo = lzma.decompress(po)\r\nLC_MESSAGES = Path(\".\") / \"fr\" / \"LC_MESSAGES\"\r\nLC_MESSAGES.mkdir(parents=True, exist_ok=True)\r\n(LC_MESSAGES / \"check.po\").write_bytes(po)\r\nrun([\"msgfmt\", str(LC_MESSAGES / \"check.po\"), \"--output-file\", str(LC_MESSAGES / \"check.mo\")])",
      "check": "from pathlib import Path\nimport gettext\nfrom correction_helper import code, fail, run, exclude_file_from_traceback\n\nexclude_file_from_traceback(__file__)\n_ = gettext.translation(\"check\", Path(__file__).parent, fallback=True).gettext\n\n\ndef check():\n    with open(\"solution.py\") as f:\n        solution = \"\\n\".join(\n            line for line in f.read().lower().split(\"\\n\") if not line.startswith(\"#\")\n        )\n    if not solution:\n        fail(\n            _(\n                \"\"\"You wrote no code (in the black area, which is a code editor).\n\nYou should write a line of code which prints `Hello world!` when\nexecuted, if you really don't know how to start, you should first read\nthe [tutorial](https://docs.python.org/3/tutorial/).\"\"\"\n            )\n        )\n    if solution.strip().replace(\"!\", \"\") == \"print(hello world)\":\n        fail(\n            _(\n                \"\"\"\"Hello world!\" is a string, in Python strings should be enclosed\n in quotes or double quotes.\nSee the [strings tutorial](\nhttps://docs.python.org/3/tutorial/introduction.html#strings)\"\"\"\n            )\n        )\n    output = run(\"solution.py\")\n    clean_output = output.lower().replace(\",\", \"\").replace(\"!\", \"\")\n    if clean_output == \"hello world\":\n        exit(0)\n    if \"print\" not in solution and \"hello\" in solution:\n        fail(\n            _(\n                \"\"\"You're not in an\n[interactive Python interpreter](\nhttps://docs.python.org/3/tutorial/interpreter.html#interactive-mode),\nyour code is tested in a file,\nso there is no implicit print here.\n\nYou have to use the [print](https://docs.python.org/3/library/functions.html#print)\nfunction.\"\"\"\n            )\n        )\n    message = _(\n        'You should print \"Hello World!\", not something else to validate this exercise.'\n    )\n\n    if not output:\n        fail(message + \"\\n\\n\" + _(\"You printed nothing :(\"))\n    else:\n        fail(f\"{message}\\n\\n\" + _(\"You printed:\") + f\"\\n\\n{code(output)}\")\n\n\nif __name__ == \"__main__\":\n    check()",
      "is_published": true,
      "solution": "print(\"Hello world!\")",
      "wording": "Write a single line of Python code to display the \"Hello world!\" string.\r\n\r\nWrite this line in the black editor, right here → then click the `Run`\r\nbutton to see how it goes, and finally the `Submit` button to submit\r\nyour answer to Hackinscience's correction bot.\r\n\r\nThe bot will review your code and test it, if all goes right you'll\r\nhave a nice green message, if something goes bad the bot will explain\r\nthe best it can.\r\n\r\nOnce your exercise is good, read the shared solutions, it's always\r\ninteresting, then click the `→` button to try another exercise.\r\n\r\n\r\n## Advice\r\n\r\nYou'll need a [string](https://docs.python.org/3/tutorial/introduction.html#strings)\r\nand the [`print()`](https://docs.python.org/3/library/functions.html#print)\r\nbuiltin function.\r\n\r\n\r\n## Evaluation\r\n\r\nThe correction bot will test your program and expect to see \"Hello world!\" (does not care about capitalisation, for this one).",
      "wording_en": "Write a single line of Python code to display the \"Hello world!\" string.\r\n\r\nWrite this line in the black editor, right here → then click the `Run`\r\nbutton to see how it goes, and finally the `Submit` button to submit\r\nyour answer to Hackinscience's correction bot.\r\n\r\nThe bot will review your code and test it, if all goes right you'll\r\nhave a nice green message, if something goes bad the bot will explain\r\nthe best it can.\r\n\r\nOnce your exercise is good, read the shared solutions, it's always\r\ninteresting, then click the `→` button to try another exercise.\r\n\r\n\r\n## Advice\r\n\r\nYou'll need a [string](https://docs.python.org/3/tutorial/introduction.html#strings)\r\nand the [`print()`](https://docs.python.org/3/library/functions.html#print)\r\nbuiltin function.\r\n\r\n\r\n## Evaluation\r\n\r\nThe correction bot will test your program and expect to see \"Hello world!\" (does not care about capitalisation, for this one).",
      "wording_fr": "Écrivez une ligne de code qui affiche \"Hello world!\" lorsqu'elle est exécutée.\r\n\r\nÉcrivez cette ligne dans l'éditeur de code (noir), là à droite →\r\n\r\nEnsuite, cliquez sur `Exécuter` si vous vouez voir ce que votre code\r\nfait une fois exécuté par Python.\r\n\r\nPuis finalement cliquez sur `Envoyer` pour envoyer votre code à la\r\nmoulinette de correction. La moulinette relira et testera votre code,\r\npuis vous indiquera si vous avez réussi, ou ce que vous devez améliorer.\r\n\r\nLorsque votre exercice est bon, vous pouvez lire les solutions\r\npartagées (le bouton du milieu), puis cliquez sur le bouton `→`\r\npermettant de passer à l'exercice suivant, devenu bleu pour\r\nl'occasion.\r\n\r\n\r\n## Conseils\r\n\r\nVous aurez besoin d'une [chaîne de caractères](https://docs.python.org/fr/3/tutorial/introduction.html#strings)\r\net de la fonction native [`print()`](https://docs.python.org/fr/3/library/functions.html#print).\r\n\r\nN'hésitez pas à cliquer sur le bouton gris \"Exécuter\", il ne fait\r\nqu'exécuter votre code et vous afficher le résultat (à droite), comme\r\nsi vous éditiez un fichier Python sur votre machine, ça vous permet\r\nd'expérimenter, autant que vous voulez.",
      "initial_solution": "",
Julien Palard's avatar
Julien Palard committed
136
      "position": 1,
Julien Palard's avatar
Julien Palard committed
137
138
      "created_at": "2020-11-11T23:00:00Z",
      "points": 1,
Julien Palard's avatar
Julien Palard committed
139
140
      "category": null,
      "page": 1
Julien Palard's avatar
Julien Palard committed
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
    }
  },
  {
    "model": "website.exercise",
    "pk": 2,
    "fields": {
      "title": "Print 42",
      "title_en": "Print 42",
      "title_fr": "Afficher 42",
      "author": 2,
      "slug": "print-42",
      "pre_check": "# AUTO GENERATED: DO NOT EDIT.\r\nfrom pathlib import Path\r\nimport base64\r\nimport lzma\r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pA3u2hybWJ2gYvCcT7dJW43OThG3WhbekhDo3WLQD7SK0ekgACTDSFMUIrraQABlBOiOQAAS2I6rrHEZ/sCAAAAAARZWg==')\r\npo = lzma.decompress(po)\r\nLC_MESSAGES = Path(\".\") / \"fr\" / \"LC_MESSAGES\"\r\nLC_MESSAGES.mkdir(parents=True, exist_ok=True)\r\n(LC_MESSAGES / \"check.po\").write_bytes(po)\r\nrun([\"msgfmt\", str(LC_MESSAGES / \"check.po\"), \"--output-file\", str(LC_MESSAGES / \"check.mo\")])",
      "check": "from pathlib import Path\nfrom correction_helper import code, fail, run, exclude_file_from_traceback\n\nexclude_file_from_traceback(__file__)\n\n\ndef check():\n    output = run(\"solution.py\")\n    if output == \"42\":\n        exit(0)\n    solution = Path(\"solution.py\").read_text()\n    if any(quote in solution for quote in ('\"', \"'\")):\n        fail(\n            \"\"\"If you're using quotes, it's not an integer, it's a string.\nprint will render it the same way, but the exercise is here to make you use numbers.\"\"\"\n        )\n    if \"print\" not in solution and \"42\" in solution:\n        fail(\n            \"\"\"You're not in Python interpreter,\nthere is no implicit print here,\nyou have to call the `print` function.\"\"\"\n        )\n    if not output:\n        fail(\n            \"\"\"Your code printed nothing, did you forgot to call the\n[print](https://docs.python.org/3/library/functions.html#print) function?\"\"\"\n        )\n    fail(\"Drzzzt: wrong, I need a 42!\\n\\n\" + code(output))\n\n\nif __name__ == \"__main__\":\n    check()",
      "is_published": true,
      "solution": "print(42)",
      "wording": "Write a single line of code displaying the number 42.\r\n\r\n\r\n## Advice\r\n\r\nYou'll need a [number](https://docs.python.org/3/tutorial/introduction.html#numbers)\r\nand the [`print()`](https://docs.python.org/3.4/library/functions.html#print) builtin function.\r\n\r\nI'm not asking to print the string \"42\", (composed of two chars), but the number 42.",
      "wording_en": "Write a single line of code displaying the number 42.\r\n\r\n\r\n## Advice\r\n\r\nYou'll need a [number](https://docs.python.org/3/tutorial/introduction.html#numbers)\r\nand the [`print()`](https://docs.python.org/3.4/library/functions.html#print) builtin function.\r\n\r\nI'm not asking to print the string \"42\", (composed of two chars), but the number 42.",
      "wording_fr": "Écrivez une seule ligne de code affichant le nombre `42`.\r\n\r\n## Conseils\r\n\r\nVous aurez besoin d'un\r\n[nombre](https://docs.python.org/3/tutorial/introduction.html#numbers)\r\net de la fonction native\r\n[`print()`](https://docs.python.org/3.4/library/functions.html#print).\r\n\r\nAttention, on ne vous demande pas d'afficher la [chaîne de\r\ncaractères](https://docs.python.org/3/tutorial/introduction.html#strings)\r\n`\"42\"`, composée de deux caractères, mais bien le nombre 42, vous\r\nn'aurez donc pas besoin de guillemets dans cet exercice.\r\n\r\nN'hésitez pas à cliquer sur le bouton gris \"Exécuter\", il ne fait\r\nqu'exécuter votre code et vous afficher le résultat (à droite), comme\r\nsi vous éditiez un fichier Python sur votre machine, ça vous permet\r\nd'expérimenter.\r\n\r\nDès que le résultat vous convient, vous pouvez utiliser le bouton bleu\r\n« Envoi pour validation » pour proposer votre code à la moulinette de\r\ncorrection.",
      "initial_solution": "",
Julien Palard's avatar
Julien Palard committed
160
      "position": 2,
Julien Palard's avatar
Julien Palard committed
161
162
      "created_at": "2020-11-11T23:00:00Z",
      "points": 1,
Julien Palard's avatar
Julien Palard committed
163
164
      "category": null,
      "page": 1
Julien Palard's avatar
Julien Palard committed
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
495
496
497
498
499
500
501
502
503
504
505
    }
  },
  {
    "model": "website.snippet",
    "pk": 1,
    "fields": {
      "user": 1,
      "source_code": "",
      "output": "",
      "created_at": "2021-02-08T15:21:35.190Z",
      "executed_at": "2021-02-08T15:21:35.407Z"
    }
  },
  {
    "model": "website.snippet",
    "pk": 2,
    "fields": {
      "user": 1,
      "source_code": "print(\"Hello world\")",
      "output": "Hello world\n",
      "created_at": "2021-02-08T15:21:41.711Z",
      "executed_at": "2021-02-08T15:21:41.786Z"
    }
  },
  {
    "model": "website.answer",
    "pk": 1,
    "fields": {
      "exercise": 1,
      "user": 1,
      "source_code": "print(\"Hello world\")",
      "is_corrected": true,
      "is_valid": true,
      "is_shared": false,
      "correction_message": "Excellent ! ! Ça me semble bon.",
      "created_at": "2021-02-08T15:21:43.407Z",
      "corrected_at": "2021-02-08T15:21:43.614Z",
      "is_unhelpfull": false
    }
  },
  {
    "model": "website.answer",
    "pk": 2,
    "fields": {
      "exercise": 1,
      "user": 1,
      "source_code": "print(\"Hello world\")",
      "is_corrected": true,
      "is_valid": true,
      "is_shared": false,
      "correction_message": "Bien joué ! Excellente réponse.",
      "created_at": "2021-02-08T15:21:57.422Z",
      "corrected_at": "2021-02-08T15:21:57.609Z",
      "is_unhelpfull": false
    }
  },
  {
    "model": "admin.logentry",
    "pk": 1,
    "fields": {
      "action_time": "2020-12-04T12:23:51.086Z",
      "user": 1,
      "content_type": 3,
      "object_id": "1",
      "object_repr": "Hello World",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 2,
    "fields": {
      "action_time": "2020-12-04T12:24:09.623Z",
      "user": 1,
      "content_type": 1,
      "object_id": "2",
      "object_repr": "Lisa",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 3,
    "fields": {
      "action_time": "2020-12-04T12:24:18.854Z",
      "user": 1,
      "content_type": 3,
      "object_id": "1",
      "object_repr": "Hello World",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Author\", \"Check\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 4,
    "fields": {
      "action_time": "2020-12-04T12:25:27.900Z",
      "user": 1,
      "content_type": 3,
      "object_id": "2",
      "object_repr": "Print 42",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 5,
    "fields": {
      "action_time": "2021-02-05T13:17:19.335Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 6,
    "fields": {
      "action_time": "2021-02-05T13:17:28.929Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Body [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 7,
    "fields": {
      "action_time": "2021-02-05T13:20:07.210Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"In menu\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 8,
    "fields": {
      "action_time": "2021-02-05T13:20:28.418Z",
      "user": 1,
      "content_type": 8,
      "object_id": "2",
      "object_repr": "a propos",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 9,
    "fields": {
      "action_time": "2021-02-05T13:20:39.732Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Position\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 10,
    "fields": {
      "action_time": "2021-02-06T13:52:27.063Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Url\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 11,
    "fields": {
      "action_time": "2021-02-06T13:52:44.266Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "test",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [en]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 12,
    "fields": {
      "action_time": "2021-02-06T13:52:59.877Z",
      "user": 1,
      "content_type": 8,
      "object_id": "3",
      "object_repr": "team",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 13,
    "fields": {
      "action_time": "2021-02-06T13:53:10.974Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "help",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 14,
    "fields": {
      "action_time": "2021-02-06T13:53:21.360Z",
      "user": 1,
      "content_type": 8,
      "object_id": "4",
      "object_repr": "sponsor",
      "action_flag": 1,
      "change_message": "[{\"added\": {}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 15,
    "fields": {
      "action_time": "2021-02-06T14:20:32.030Z",
      "user": 1,
      "content_type": 8,
      "object_id": "2",
      "object_repr": "À propos",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [en]\", \"Title [fr]\", \"Body [en]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 16,
    "fields": {
      "action_time": "2021-02-06T14:50:27.267Z",
      "user": 1,
      "content_type": 8,
      "object_id": "2",
      "object_repr": "À propos",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Body [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 17,
    "fields": {
      "action_time": "2021-02-06T14:56:29.228Z",
      "user": 1,
      "content_type": 8,
      "object_id": "4",
      "object_repr": "sponsor",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Body [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 18,
    "fields": {
      "action_time": "2021-02-06T16:26:56.244Z",
      "user": 1,
      "content_type": 8,
      "object_id": "4",
      "object_repr": "Soutenir",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [en]\", \"Title [fr]\", \"Body [en]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 19,
    "fields": {
      "action_time": "2021-02-06T16:30:26.064Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "Aide",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [en]\", \"Title [fr]\", \"Body [en]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 20,
    "fields": {
      "action_time": "2021-02-08T16:50:29.820Z",
      "user": 1,
      "content_type": 8,
      "object_id": "3",
      "object_repr": "team",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Body [en]\", \"Body [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 21,
    "fields": {
      "action_time": "2021-02-08T16:50:41.592Z",
      "user": 1,
      "content_type": 8,
      "object_id": "3",
      "object_repr": "L'équipe",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Title [en]\", \"Title [fr]\"]}}]"
    }
  },
  {
    "model": "admin.logentry",
    "pk": 22,
    "fields": {
      "action_time": "2021-02-08T17:01:12.422Z",
      "user": 1,
      "content_type": 8,
      "object_id": "1",
      "object_repr": "Aide",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"Body [en]\", \"Body [fr]\"]}}]"
    }
Julien Palard's avatar
Julien Palard committed
506
507
508
509
510
511
512
513
514
515
516
517
518
  },
  {
    "model": "admin.logentry",
    "pk": 23,
    "fields": {
      "action_time": "2021-10-03T15:48:21.176Z",
      "user": 1,
      "content_type": 1,
      "object_id": "2",
      "object_repr": "Lisa",
      "action_flag": 2,
      "change_message": "[{\"changed\": {\"fields\": [\"First name\", \"Last name\"]}}]"
    }
Julien Palard's avatar
Julien Palard committed
519
520
  }
]