Doing copy-paste always lead to indentation fault.Try to copy the code on any editor and then indent 2nd statement by 4 or 8 space indent .
On Friday, March 1, 2019 at 4:44:33 AM UTC+5:30, Edvani Pascoal wrote:
-- On Friday, March 1, 2019 at 4:44:33 AM UTC+5:30, 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:(my_env) root@ubuntu:~/django-test/djangoproject# python manage.py runserver 192.168.184.202:8000 Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x7fa7af08b9d8>
Traceback (most recent call last):
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/utils/ autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/core/ management/commands/runserver. py", line 109, in inner_run
autoreload.raise_last_exception()
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/utils/ autoreload.py", line 248, in raise_last_exception
raise _exception[1]
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/core/ management/__init__.py", line 337, in execute
autoreload.check_errors(django.setup)()
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/utils/ autoreload.py", line 225, in wrapper
fn(*args, **kwargs)
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/apps/registry. py", line 112, in populate
app_config.import_models()
File "/home/edvani/django-test/my_env/lib/python3.6/site- packages/django/apps/config. py", line 198, in import_models
self.models_module = import_module(models_module_name)
File "/usr/lib/python3.6/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 674, in exec_module
File "<frozen importlib._bootstrap_external>", line 781, in get_code
File "<frozen importlib._bootstrap_external>", line 741, in source_to_code
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/edvani/django-test/djangoproject/polls/models.py" , line 5
question_text = models.CharField(max_length=200)
^
IndentationError: expected an indented blockI need help how to solve this??
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/1d1b8309-247d-4926-ab17-de6eb18b70a9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment