Thursday, February 28, 2019

Re: Problems with first program

On 2/28/2019 6:08 PM, Edvani Pascoal wrote:
> hey guys I'm beginner on django I never worked with this framework
> before and then I've problems to started polls app this is the error:
>
deleting most of the traceback since in this case it is not relevant.
>   File "/home/edvani/django-test/djangoproject/polls/models.py", line 5
>     question_text = models.CharField(max_length=200)
>                 ^
> IndentationError: expected an indented block
>
Here is the head of models.py, as copied from the tutorial

from django.db import models


class Question(models.Model):
    question_text = models.CharField(max_length=200)

Your copy of that file is different. Statement that end in : must be
followed by at least one indented line. These are known as "compound
statements" (if, elif, else, while, for, try, except, finally, with).

--
Bob Gailer


---
This email has been checked for viruses by Avast antivirus software.
https://www.avast.com/antivirus

--
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 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/580f4cd8-1d87-56a0-7548-c20e26e3e446%40gmail.com.
For more options, visit https://groups.google.com/d/optout.

No comments:

Post a Comment