@@ -173,13 +173,13 @@ field is initialized to a particular value. For example:
173173 >>> from django import forms
174174 >>> class CommentForm(forms.Form):
175175 ... name = forms.CharField(initial="Your name")
176- ... url = forms.URLField(initial="http ://")
176+ ... url = forms.URLField(initial="https ://")
177177 ... comment = forms.CharField()
178178 ...
179179 >>> f = CommentForm(auto_id=False)
180180 >>> print(f)
181181 <div>Name:<input type="text" name="name" value="Your name" required></div>
182- <div>Url:<input type="url" name="url" value="http ://" required></div>
182+ <div>Url:<input type="url" name="url" value="https ://" required></div>
183183 <div>Comment:<input type="text" name="comment" required></div>
184184
185185You may be thinking, why not just pass a dictionary of the initial values as
@@ -193,15 +193,15 @@ and the HTML output will include any validation errors:
193193 ... url = forms.URLField()
194194 ... comment = forms.CharField()
195195 ...
196- >>> default_data = {"name": "Your name", "url": "http ://"}
196+ >>> default_data = {"name": "Your name", "url": "https ://"}
197197 >>> f = CommentForm(default_data, auto_id=False)
198198 >>> print(f)
199199 <div>Name:
200200 <input type="text" name="name" value="Your name" required>
201201 </div>
202202 <div>Url:
203203 <ul class="errorlist"><li>Enter a valid URL.</li></ul>
204- <input type="url" name="url" value="http ://" required aria-invalid="true">
204+ <input type="url" name="url" value="https ://" required aria-invalid="true">
205205 </div>
206206 <div>Comment:
207207 <ul class="errorlist"><li>This field is required.</li></ul>
@@ -219,7 +219,7 @@ validation if a particular field's value is not given. ``initial`` values are
219219
220220 >>> class CommentForm(forms.Form):
221221 ... name = forms.CharField(initial="Your name")
222- ... url = forms.URLField(initial="http ://")
222+ ... url = forms.URLField(initial="https ://")
223223 ... comment = forms.CharField()
224224 ...
225225 >>> data = {"name": "", "url": "", "comment": "Foo"}
0 commit comments