Show button that user used to vote and update README.md

This commit is contained in:
sosokker 2023-09-14 18:25:14 +07:00
parent e4f31bff6b
commit aa0810fca8
2 changed files with 4 additions and 4 deletions

View File

@ -33,8 +33,8 @@ or
4. Run these commands
```bash
python manage.py migrate
python manage.py loaddata data/polls-v1.json
python manage.py loaddata data/user.json
python manage.py loaddata data/polls.json
python manage.py loaddata data/users.json
python manage.py runserver
```

View File

@ -61,10 +61,10 @@
{% for choice in question.choice_set.all %}
<label>
{% 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
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 }}')">
{{ choice.choice_text }}
</button>