diff options
| author | 2018-05-19 20:13:51 +0200 | |
|---|---|---|
| committer | 2018-05-19 20:13:51 +0200 | |
| commit | 4bba9d0cdf8361e5529281a98d14bc4bb0ceb669 (patch) | |
| tree | 5747395e8dae9a42f6935da1979bb2a88abaef75 /pysite/migrations/tables/snake_quiz | |
| parent | [Jams] Some amount of public display, but links not ready yet (diff) | |
Snake cog (#71)
* Tables that are initialized with JSON files in the table_init folder will now sync properly if the JSON file is changed after initialization. Any lines that are either added or removed will be updated whenever site is rebooted.
* Initial API endpoint for snake_quiz
* reverting database.py
* I WILL KILL YOU
* Added the snake_fact API endpoint
* Moving snake tables to the new migrations system
* Set up initial data for all new tables, added table objects, wrote endpoints, and wrote tests for the new endpoints.
* Removing the snake_movies endpoint. That idea didn't pan out.
* Added an endpoint for getting special snake cases
* broken json
* Fixing the initial data slightly, better picture of bob.
* Changing JSON indentation to be 4 spaces consistently in all initial_data, to address Aperture's review. Also changing all the endpoints to have correct namespacing, addressing gdude's review.
* Fixing tests to point to new API endpoints
Diffstat (limited to 'pysite/migrations/tables/snake_quiz')
| -rw-r--r-- | pysite/migrations/tables/snake_quiz/__init__.py | 0 | ||||
| -rw-r--r-- | pysite/migrations/tables/snake_quiz/initial_data.json | 200 |
2 files changed, 200 insertions, 0 deletions
diff --git a/pysite/migrations/tables/snake_quiz/__init__.py b/pysite/migrations/tables/snake_quiz/__init__.py new file mode 100644 index 00000000..e69de29b --- /dev/null +++ b/pysite/migrations/tables/snake_quiz/__init__.py diff --git a/pysite/migrations/tables/snake_quiz/initial_data.json b/pysite/migrations/tables/snake_quiz/initial_data.json new file mode 100644 index 00000000..8c426b22 --- /dev/null +++ b/pysite/migrations/tables/snake_quiz/initial_data.json @@ -0,0 +1,200 @@ +[ + { + "id": 0, + "question": "How long have snakes been roaming the Earth for?", + "options": { + "a": "3 million years", + "b": "30 million years", + "c": "130 million years", + "d": "200 million years" + }, + "answerkey": "c" + }, + { + "id": 1, + "question": "What characteristics do all snakes share?", + "options": { + "a": "They are carnivoes", + "b": "They are all programming languages", + "c": "They're all cold-blooded", + "d": "They are both carnivores and cold-blooded" + }, + "answerkey": "c" + }, + { + "id": 2, + "question": "How do snakes hear?", + "options": { + "a": "With small ears", + "b": "Through their skin", + "c": "Through their tail", + "d": "They don't use their ears at all" + }, + "answerkey": "b" + }, + { + "id": 3, + "question": "What can't snakes see?", + "options": { + "a": "Colour", + "b": "Light", + "c": "Both of the above", + "d": "Other snakes" + }, + "answerkey": "a" + }, + { + "id": 4, + "question": "What unique vision ability do boas and pythons possess?", + "options": { + "a": "Night vision", + "b": "Infrared vision", + "c": "See through walls", + "d": "They don't have vision" + }, + "answerkey": "b" + }, + { + "id": 5, + "question": "How does a snake smell?", + "options": { + "a": "Quite pleasant", + "b": "Through its nose", + "c": "Through its tongues", + "d": "Both through its nose and its tongues" + }, + "answerkey": "d" + }, + { + "id": 6, + "question": "Where are Jacobson's organs located in snakes?", + "options": { + "a": "Mouth", + "b": "Tail", + "c": "Stomach", + "d": "Liver" + }, + "answerkey": "a" + }, + { + "id": 7, + "question": "Snakes have very similar internal organs compared to humans. Snakes, however; lack the following:", + "options": { + "a": "A diaphragm", + "b": "Intestines", + "c": "Lungs", + "d": "Kidney" + }, + "answerkey": "a" + }, + { + "id": 8, + "question": "Snakes have different shaped lungs than humans. What do snakes have?", + "options": { + "a": "An elongated right lung", + "b": "A small left lung", + "c": "Both of the above", + "d": "None of the above" + }, + "answerkey": "c" + }, + { + "id": 9, + "question": "What's true about two-headed snakes?", + "options": { + "a": "They're a myth!", + "b": "They rarely survive in the wild", + "c": "They're very dangerous", + "d": "They can kiss each other" + }, + "answerkey": "b" + }, + { + "id": 10, + "question": "What substance covers a snake's skin?", + "options": { + "a": "Calcium", + "b": "Keratin", + "c": "Copper", + "d": "Iron" + }, + "answerkey": "b" + }, + { + "id": 11, + "question": "What snake doesn't have to have a mate to lay eggs?", + "options": { + "a": "Copperhead", + "b": "Cornsnake", + "c": "Kingsnake", + "d": "Flower pot snake" + }, + "answerkey": "d" + }, + { + "id": 12, + "question": "What snake is the longest?", + "options": { + "a": "Green anaconda", + "b": "Reticulated python", + "c": "King cobra", + "d": "Kingsnake" + }, + "answerkey": "b" + }, + { + "id": 13, + "question": "Though invasive species can now be found in the Everglades, in which three continents are pythons (members of the family Pythonidae) found in the wild?", + "options": { + "a": "Africa, Asia and Australia", + "b": "Africa, Australia and Europe", + "c": "Africa, Australia and South America", + "d": "Africa, Asia and South America" + }, + "answerkey": "a" + }, + { + "id": 14, + "question": "Pythons are held as some of the most dangerous snakes on earth, but are often confused with anacondas. Which of these is *not* a difference between pythons and anacondas?", + "options": { + "a": "Pythons suffocate their prey, anacondas crush them", + "b": "Pythons lay eggs, anacondas give birth to live young", + "c": "Pythons grow longer, anacondas grow heavier", + "d": "Pythons generally spend less time in water than anacondas do" + }, + "answerkey": "a" + }, + { + "id": 15, + "question": "Pythons are unable to chew their food, and so swallow prey whole. Which of these methods is most commonly demonstrated to help a python to swallow large prey?", + "options": { + "a": "The python's stomach pressure is reduced, so prey is sucked in", + "b": "An extra set of upper teeth 'walk' along the prey", + "c": "The python holds its head up, so prey falls into its stomach", + "d": "Prey is pushed against a barrier and is forced down the python's throat" + }, + "answerkey": "b" + }, + { + "id": 16, + "question": "Pythons, like many large constrictors, possess vestigial hind limbs. Whilst these 'spurs' serve no purpose in locomotion, how are they put to use by some male pythons? ", + "options": { + "a": "To store sperm", + "b": "To release pheromones", + "c": "To grip females during mating", + "d": "To fight off rival males" + }, + "answerkey": "c" + }, + { + "id": 17, + "question": "Pythons tend to travel by the rectilinear method (in straight lines) when on land, as opposed to the concertina method (s-shaped movement). Why do large pythons tend not to use the concertina method? ", + "options": { + "a": "Their spine is too inflexible", + "b": "They move too slowly", + "c": "The scales on their backs are too rigid", + "d": "They are too heavy" + }, + "answerkey": "d" + } +] |