Commit 6092c923 authored by ana's avatar ana
Browse files

adapting templates to form

parent 3a8672bc
......@@ -57,6 +57,7 @@ def step4():
selection_1.append(d)
ctx['choice_1'] = choice_1 = random.choice(selection_1)
ctx['image_species'] = [x.strip() for x in choice_1['image_species'].split(',')]
ctx['image_rune'] = [x.strip() for x in choice_1['image_rune'].split(',')]
# pick randomly row of data depending on chakra_2
for d in data_general:
if d['chakra_number'] == str(chakra_2):
......@@ -69,7 +70,20 @@ def step4():
ctx['choice_3'] = choice_3 = random.choice(selection_3)
ctx['chakra_2'] = chakra_2 = int(chakra_2)
ctx['chakra_3'] = chakra_3 = int(chakra_3)
ctx['image_planet'] = image_planet = choice_2['image_planet']
ctx['image_tarot'] = image_tarot = choice_3['image_tarot']
ctx['image_chakra_stone'] = images_chakra_stone = [x.strip() for x in choice_2['image_chakra_stone'].split(',')]
ctx['chakra_frequency'] = frequency = choice_1['chakra_frequency']
ctx['sound_frequency'] = sound_frequency = choice_1['sound_frequency']
ctx['primal'] = primal = choice_1['chakra_primal_sound']
ctx['sound_primal'] = sound_primal = choice_1['recording_primal']
ctx['bija'] = bija = choice_2['chakra_bija_mantra']
ctx['sound_bija'] = sound_bija = choice_2['recording_bija']
ctx['vowel'] = vowel = choice_3['chakra_vowel']
ctx['sound_vowel'] = sound_vowel = choice_3['recording_vowel']
ctx['solfeggio'] = solfeggio = choice_3['chakra_solfeggio']
ctx['sound_solfeggio'] = sound_solfeggio = choice_3['recording_solfeggio']
chosen_form = int(ctx['form'])
# chosen form is a tree
if chosen_form == 1:
......
......@@ -19,26 +19,26 @@
<p>The Latin name of the tree that might help you, is: {{choice_1['species_latin']}}</p>
{% if choice_1['celtic_use'] %}
In the Celtic tradition the tree was approached for the following reasons: {{choice_1['celtic_use']}}
<p>In the Celtic tradition the tree was approached for the following reasons: {{choice_1['celtic_use']}}</p>
{% endif %}
{% if choice_1['celtic_value_1'] %}
In the Celtic tradition the tree was symbol for: {{choice_1['celtic_value_1']}}
<p>In the Celtic tradition the tree was symbol for: {{choice_1['celtic_value_1']}}</p>
{% endif %}
{% if choice_1['celtic_value_2'] %}
In the Celtic tradition the tree was also symbol for: {{choice_1['celtic_value_2']}}
<p>In the Celtic tradition the tree was also symbol for: {{choice_1['celtic_value_2']}}</p>
{% endif %}
{% if choice_1['celtic_value_3'] %}
In the Celtic tradition the tree was also symbol for: {{choice_1['celtic_value_3']}}
<p>In the Celtic tradition the tree was also symbol for: {{choice_1['celtic_value_3']}}</p>
{% endif %}
{% if choice_1['edibility'] %}
Some parts of this tree are edible: {{choice_1['edibility']}}
<p>Some parts of this tree are edible: {{choice_1['edibility']}}</p>
{% endif %}
{% if choice_1['characteristics'] %}
More characteristics: {{choice_1['characteristics']}}
<p>More characteristics: {{choice_1['characteristics']}}</p>
{% endif %}
<h2>ADDITIONAL ATTUNEMENT ELEMENTS</h2>
......
{% extends "step1.html" %}
{% block step_title %}{% endblock %}
{% block step_form %}
<h1>CHAKRA</h1>
<p>The chakra that might help you with your question is, in English, {{choice_1['chakra_type_english']}}.</p>
<p>In Sanskrit it is named {{choice_1['chakra_type_sanskrit']}}.</p>
<p>The location of the chakra is {{choice_1['chakra_location']}}.</p>
<p>The first quality that is related to this chakra, is {{choice_1['chakra_quality_1']}}.</p>
<p>The second quality that is related to this chakra, is {{choice_1['chakra_quality_2']}}.</p>
<p>The third quality that is related to this chakra, is {{choice_1['chakra_quality_3']}}.</p>
<p>The colour you can work with is {{choice_1['chakra_colour']}}.</p>
<p>The stones that activate this chakra are {{choice_1['chakra_stone']}}.</p>
<p>The element that activates this chakra is {{choice_1['chakra_element']}}.</p>
<p>The action that activates this chakra is {{choice_1['chakra_action']}}.</p>
<p>The gland that is activated through this chakra is the {{choice_1['chakra_gland']}}.</p>
<h2>ADDITIONAL ATTUNEMENT ELEMENTS</h2>
<style>
img { max-width: 100px; }
</style>
<img src="{{ url_for('static', filename=image_planet) }}">
<img src="{{ url_for('static', filename=image_tarot) }}">
<p>The planet that might help you with your question is {{choice_2['planet']}}.</p>
<p>The tarot card that might help you with your question is {{choice_3['tarot_card']}}</p>
<form onsubmit="return validate()" method="get" action="{{ url_for('step4') }}">
</form>
<script>
</script>
{% endblock %}
\ No newline at end of file
{% extends "step1.html" %}
{% block step_title %}{% endblock %}
{% block step_form %}
<h1>EXERCISE</h1>
<style>
img { max-width: 100px; }
</style>
<img src="{{ url_for('static', filename=image_rune[0]) }}">
<img src="{{ url_for('static', filename=image_rune[1]) }}">
<p>The exercise(s) that might help you, is {{choice_1['mouvement']}}.</p>
<h2>ADDITIONAL ATTUNEMENT ELEMENTS</h2>
<style>
img { max-width: 100px; }
</style>
{% for x in images_chakra_stone %}
<img src="{{ url_for('static', filename=image_chakra_stone[x]) }}">
{% endfor %}
<p>The stones that might help you with this exercise, are {{choice_2['chakra_stone']}}.</p>
<p>You might want to wear clothes of the colour {{choice_3['chakra_colour']}}.</p>
<form onsubmit="return validate()" method="get" action="{{ url_for('step4') }}">
</form>
<script>
</script>
{% endblock %}
\ No newline at end of file
{% extends "step1.html" %}
{% block step_title %}{% endblock %}
{% block step_form %}
<h1>MANTRA</h1>
<p>The primal sound that relates to your question is: primal. </p>
<p>The Bija mantra that resonates with your question is: bija. </p>
<p>The vowel that resonates with your question is: vowel.</p>
<p>The solfeggio that resonates with your question is: solfeggio.</p>
# generate song
{% subprocess.call(['sox'] + song + ['out.mp3']) %}
{% new_song = AudioSegment.from_mp3('out.mp3') %}
# play song
{% play(new_song) %}
<h2>ADDITIONAL ATTUNEMENT ELEMENTS</h2>
<p>The frequency that resonates with your question is: frequency.</p>
<form method="get" action="{{ url_for('step5') }}">
<p>
<label for="answer_4">Would you also like to hum to the frequency that resonates with your question?</label>
<select name="answer_4">
<option value="1">yes</option>
<option value="2">no</option>
</select>
</p>
<p><input type="submit" value="continue"></p>
<input type="hidden" name="answer_4"{{ {'value': answer_4 } | xmlattr }}>
<form onsubmit="return validate()" method="get" action="{{ url_for('step4') }}">
</form>
<script>
</script>
{% endblock %}
\ No newline at end of file
{% extends "step1.html" %}
{% block step_title %}{% endblock %}
{% block step_form %}
frequency_song = AudioSegment.from_mp3(sound_frequency)
play(frequency_song)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment