There is some syntax error in the file. Please ensure that your file is following python syntax. I hope you know basics of python.
---- On Wed, 01 Feb 2017 13:17:39 +0530 Zhou Sicong <genie10001@gmail.com> wrote ----
Hi,I tried doing exactly everything as told in Tutorial 1 (https://docs.djangoproject.com/en/1.10/intro/tutorial01/)I use idle to write the polls.py and urls.pyDo i totally overwrite the code already in those file or leave them alone and add on the codes in the tutorial.Because i always get this when i start run the server again. What could possibly be the error?Performing system checks...Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x03C7D978>Traceback (most recent call last):File "c:\django\django\utils\autoreload.py", line 226, in wrapperfn(*args, **kwargs)File "c:\django\django\core\management\commands\runserver.py", line 125, in inner_runself.check(display_num_errors=True)File "c:\django\django\core\management\base.py", line 356, in checkinclude_deployment_checks=include_deployment_checks,File "c:\django\django\core\management\base.py", line 343, in _run_checksreturn checks.run_checks(**kwargs)File "c:\django\django\core\checks\registry.py", line 78, in run_checksnew_errors = check(app_configs=app_configs)File "c:\django\django\core\checks\urls.py", line 13, in check_url_configreturn check_resolver(resolver)File "c:\django\django\core\checks\urls.py", line 23, in check_resolverreturn check_method()File "c:\django\django\urls\resolvers.py", line 247, in checkfor pattern in self.url_patterns:File "c:\django\django\utils\functional.py", line 31, in __get__res = instance.__dict__[self.name] = self.func(instance)File "c:\django\django\urls\resolvers.py", line 398, in url_patternspatterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "c:\django\django\utils\functional.py", line 31, in __get__res = instance.__dict__[self.name] = self.func(instance)File "c:\django\django\urls\resolvers.py", line 391, in urlconf_modulereturn import_module(self.urlconf_name)File "C:\Users\SzeChong\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 986, in _gcd_importFile "<frozen importlib._bootstrap>", line 969, in _find_and_loadFile "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 673, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 662, in exec_moduleFile "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removedFile "C:\mysite\mysite\urls.py", line 20, in <module>url(r'^polls/', include('polls.urls')),File "c:\django\django\conf\urls\__init__.py", line 39, in includeurlconf_module = import_module(urlconf_module)File "C:\Users\SzeChong\AppData\Local\Programs\Python\Python35-32\lib\importlib\__init__.py", line 126, in import_modulereturn _bootstrap._gcd_import(name[level:], package, level)File "<frozen importlib._bootstrap>", line 986, in _gcd_importFile "<frozen importlib._bootstrap>", line 969, in _find_and_loadFile "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlockedFile "<frozen importlib._bootstrap>", line 673, in _load_unlockedFile "<frozen importlib._bootstrap_external>", line 658, in exec_moduleFile "<frozen importlib._bootstrap_external>", line 764, in get_codeFile "<frozen importlib._bootstrap_external>", line 724, in source_to_codeFile "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removedFile "C:\mysite\polls\urls.py", line 1Python 3.5.1 (v3.5.1:37a07cee5969, Dec 6 2015, 01:38:48) [MSC v.1900 32 bit (Intel)] on win32^SyntaxError: invalid syntax
--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/CAF_57Gsq7nM5bJNGhhdoomQV9ywJ6pN5AgOfdGVYXe2jzFn4sg%40mail.gmail.com.For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment