Hi,

I really suggest you to use real editor or even IDE.

For editor I've been using VS Code.

For IDE PyCharm is pretty nice.

2.8.2017 3.53 "'SNATCHGIRL1' via Django users" <
django-users@googlegroups.com> kirjoitti:

> Hi Jani,
>
> thank you for the response. It was really helpful. Instead of using word I
> edited the html files with Notepad. Now it's working :)
>
> Am Dienstag, 1. August 2017 23:01:49 UTC+10 schrieb Jani Tiainen:
>>
>> Hi.
>>
>> You need to make sure that file is really encoded as utf8 and contains
>> valid unicode characters.
>>
>> Some editors, specially in windows tend to do lot of black magic to
>> display characters correctly.
>>
>>
>> On 01.08.2017 09:18, 'SNATCHGIRL1' via Django users wrote:
>>
>> Hi everyone,
>>
>> I am a Django newbie and started the Tutorial. I followed all steps so
>> far but I am stuck at the part 4.
>> So far I've written 3 templates.
>>
>> *1.* file:///C:/Python27/Django/mysite/polls/templates/polls/detail.html
>>
>> <h1>{{ question.question_text }}</h1>
>>
>>
>>
>> {% if error_message %}<p><strong>{{ error_message }}</strong></p>{% endif
>>  %}
>>
>>
>>
>> <form action="{% url 'polls:vote' question.id %}" method="post">
>>
>> {% csrf_token %}
>>
>> {% for choice in question.choice_set.all %}
>>
>>     <input type="radio" name="choice" id="choice{{ forloop.counter }}"
>> value="{{ choice.id }}" />
>>
>>     <label for="choice{{ forloop.counter }}">{{ choice.choice_text }}</
>> label><br />
>>
>> {% endfor %}
>>
>> <input type="submit" value="Vote" />
>>
>> <
>>
>> /form>
>>
>>
>> *2. *file:///C:/Python27/Django/mysite/polls/templates/polls/index.html
>>
>>
>> {% if latest_question_list %}
>>
>>     <ul>
>>
>>     {% for question in latest_question_list %}
>>
>>         <li><a href="{% url 'polls:detail' question.id %}">{{
>> question.question_text }}</a></li>
>>
>>     {% endfor %}
>>
>>     </ul>
>>
>> {% else %}
>>
>>     <p>No polls are available.</p>
>>
>> {% endif %}
>>
>>
>> * 3. *file:///C:/Python27/Django/mysite/polls/templates/polls/
>> results.html
>>
>>
>> <h1>{{ question.question_text }}</h1>
>>
>>
>>
>> <ul>
>>
>> {% for choice in question.choice_set.all %}
>>
>>     <li>{{ choice.choice_text }} -- {{ choice.votes }} vote{{
>> choice.votes|pluralize }}</li>
>>
>> {% endfor %}
>>
>> </ul>
>>
>>
>>
>> <a href="{% url 'polls:detail' question.id %}">Vote again?</a>
>>
>>
>>
>> just like explained in the tutorial.
>>
>>
>> When I wan to run it on the server I get the error:
>>
>>
>>
>> UnicodeDecodeError at /polls/1/
>>
>> 'utf8' codec can't decode byte 0xa0 in position 22431: invalid start byte
>>
>> Request Method: GET
>> Request URL: http://127.0.0.1:8000/polls/1/
>> Django Version: 1.11.3
>> Exception Type: UnicodeDecodeError
>> Exception Value:
>>
>> 'utf8' codec can't decode byte 0xa0 in position 22431: invalid start byte
>>
>> Exception Location: C:\Python27\lib\codecs.py in decode, line 314
>> Python Executable: C:\Python27\python.exe
>> Python Version: 2.7.13
>> Python Path:
>>
>> ['C:\\Python27\\Django\\mysite',
>>  'C:\\Windows\\system32\\python27.zip',
>>  'C:\\Python27\\DLLs',
>>  'C:\\Python27\\lib',
>>  'C:\\Python27\\lib\\plat-win',
>>  'C:\\Python27\\lib\\lib-tk',
>>  'C:\\Python27',
>>  'C:\\Python27\\lib\\site-packages']
>>
>> Server time: Tue, 1 Aug 2017 16:03:11 +1000
>> Unicode error hint
>>
>> The string that could not be encoded/decoded was: *yes'>��� </*
>>
>>
>> I see the same when I encode my html files with utf-8 in word.
>>
>>
>> Unfortunately I don't know how to fix this. I've read many threats but
>> none of them really helped me to solve this issue.
>>
>> Has anyone experienced a similar problem and can help me?
>>
>>
>>
>> --
>> 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...@googlegroups.com.
>> To post to this group, send email to django...@googlegroups.com.
>> Visit this group at https://groups.google.com/group/django-users.
>> To view this discussion on the web visit https://groups.google.com/d/ms
>> gid/django-users/4360a617-289d-4e4c-8f60-b7dda65e1fda%40googlegroups.com
>> <https://groups.google.com/d/msgid/django-users/4360a617-289d-4e4c-8f60-b7dda65e1fda%40googlegroups.com?utm_medium=email&utm_source=footer>
>> .
>> For more options, visit https://groups.google.com/d/optout.
>>
>>
>> --
>> Jani Tiainen
>>
>> --
> 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+unsubscr...@googlegroups.com.
> To post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/
> msgid/django-users/1daf722c-4eb0-4c5d-b2d9-a13512ff6ca9%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/1daf722c-4eb0-4c5d-b2d9-a13512ff6ca9%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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+unsubscr...@googlegroups.com.
To post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAHn91odBqYFqG_N2zVvjX9dJ11X1pnQtbw%2B3QTVAPWvyRoPUmQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to