Wednesday, October 26, 2022

Re: Does not displayed radio button in tutorial04

Hi Member,

I solved this problem. I missed some of the content of the following sections.


In particular, the following statements.

# Create three choices.
>>> q.choice_set.create(choice_text='Not much', votes=0)
<Choice: Not much>
>>> q.choice_set.create(choice_text='The sky', votes=0)
<Choice: The sky>
>>> c = q.choice_set.create(choice_text='Just hacking again', votes=0)

Thanks!


2022年9月12日(月) 3:49 Mats <shinsk@gmail.com>:
Hi, Member

I am going through the tutorial at docs.djangoproject.com." I am implementing a form in "Writing your first Django app, part 4" but when I enter the code as per the tutorial, the radio buttons on the form do not appear.


I think it is because the contents of the fieldset element are not being rendered, but why is this happening? I am running django 4.1, latest version of Chrome.

The source code of the displayed page is as follows:

<form action="/polls/1/vote/" method="post">
    <input type="hidden" name="csrfmiddlewaretoken" value="Kt8oNcQx8e6fFF2JAxUOqGDVXAwRis8IiRs6B8kx33u3lNAFD6pH1k9fdYAHR8Zr">
    <fieldset>
        <legend><h1>What&#x27;s up</h1></legend>
       

    </fieldset>
    <input type="submit" value="Vote">
    </form>
<a href="/polls/">return index</a>

----
Mats

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/0af1422e-69f4-43b7-9cf6-6e78cd4df256n%40googlegroups.com.


--

--
You received this message because you are subscribed to the Google Groups "Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscribe@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAF67J8p%2BZex71JuvszsH-q6z-8b8V1ioWm69Y5fVcgsVHmOkyw%40mail.gmail.com.

No comments:

Post a Comment