mirror of
https://github.com/Sosokker/ku-polls.git
synced 2025-12-18 21:14:05 +01:00
Show button that user used to vote and update README.md
This commit is contained in:
parent
e4f31bff6b
commit
aa0810fca8
@ -33,8 +33,8 @@ or
|
|||||||
4. Run these commands
|
4. Run these commands
|
||||||
```bash
|
```bash
|
||||||
python manage.py migrate
|
python manage.py migrate
|
||||||
python manage.py loaddata data/polls-v1.json
|
python manage.py loaddata data/polls.json
|
||||||
python manage.py loaddata data/user.json
|
python manage.py loaddata data/users.json
|
||||||
python manage.py runserver
|
python manage.py runserver
|
||||||
```
|
```
|
||||||
|
|
||||||
|
|||||||
@ -61,10 +61,10 @@
|
|||||||
{% for choice in question.choice_set.all %}
|
{% for choice in question.choice_set.all %}
|
||||||
<label>
|
<label>
|
||||||
{% if choice == selected_choice %}
|
{% if choice == selected_choice %}
|
||||||
<input type="radio" name="choice" value="{{ choice.id }}" class="hidden" />
|
<input type="radio" name="choice" value="{{ choice.id }}" class="hidden" checked="checked"/>
|
||||||
<button
|
<button
|
||||||
type="button"
|
type="button"
|
||||||
class="choice-button selected bg-white-500 border-2 border-black hover:bg-neutral-200 text-black px-4 py-2 rounded-lg shadow-md transition-colors duration-300 w-full py-5 font-bold text-lg truncate"
|
class="choice-button selected bg-green-500 border-solid border-2 border-black hover:bg-green-600 text-black px-4 py-2 rounded-lg shadow-md transition-colors duration-300 w-full py-5 font-bold text-lg truncate"
|
||||||
onclick="toggleChoice(this, '{{ choice.id }}')">
|
onclick="toggleChoice(this, '{{ choice.id }}')">
|
||||||
{{ choice.choice_text }}
|
{{ choice.choice_text }}
|
||||||
</button>
|
</button>
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user