try to swap both statement
On Tue, Oct 11, 2016 at 2:13 AM, Tim Graham <timograham@gmail.com> wrote:
Add a comma after: url(r'^polls/', include('polls.urls'))
(these are items in a list, separated by a comma)
On Monday, October 10, 2016 at 4:42:30 PM UTC-4, Johnny McClung wrote:I am getting an error when I try to run the Django server.>> mysite >> polls >> urls.pyfrom django.conf.urls import urlfrom . import viewsurlpatters = [url(r'^$', views.index, name='index'),]>> mysite >> mysite >> urls.pyfrom django.conf.urls import include, urlfrom django.contrib import adminurlpatterns = [url(r'^polls/', include('polls.urls'))url(r'^admin/', admin.site.urls),]Error:E:\Dropbox\Python Scripts\mysite>python manage.py runserverPerforming system checks...Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x03F616A8>Traceback (most recent call last):File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\utils\ autoreload.py", line 226, in wrapper fn(*args, **kwargs)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\man agement\commands\runserver.py" , line 121, in inner_run self.check(display_num_errors=True) File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\man agement\base.py", line 374, in check include_deployment_checks=include_deployment_checks, File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\man agement\base.py", line 361, in _run_checks return checks.run_checks(**kwargs)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\che cks\registry.py", line 81, in run_checks new_errors = check(app_configs=app_configs)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\che cks\urls.py", line 14, in check_url_config return check_resolver(resolver)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\core\che cks\urls.py", line 24, in check_resolver for pattern in resolver.url_patterns:File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\utils\ functional.py", line 35, in __get__ res = instance.__dict__[self.name] = self.func(instance)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\urls\res olvers.py", line 313, in url_patterns patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\utils\ functional.py", line 35, in __get__ res = instance.__dict__[self.name] = self.func(instance)File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \site-packages\django\urls\res olvers.py", line 306, in urlconf_module return import_module(self.urlconf_name) File "C:\Users\geek\AppData\Local\Programs\Python\Python35-32\lib \importlib\__init__.py", line 126, in import_module return _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 661, in exec_module File "<frozen importlib._bootstrap_external>", line 767, in get_code File "<frozen importlib._bootstrap_external>", line 727, in source_to_code File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removedFile "E:\Dropbox\Python Scripts\mysite\mysite\urls.py", line 21 url(r'^admin/', admin.site.urls),^SyntaxError: invalid syntaxAny help would be appreciated. Thank you.To view this discussion on the web visit https://groups.google.com/d/--
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 .msgid/django-users/a2fb5396- .1818-4f92-8f45-7e78fd658dff% 40googlegroups.com
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/CAAcansvWhhv-eACzKoD7rgziW6K-BhgYurYbHDunPw8%3D0bLOpg%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment