Discussion:
runserver error rectification
Sanjay Malviya
2018-11-26 16:41:45 UTC
Permalink
good evening, pls anyone help me in error out following command
notification got after runserver command
PS C:\Users\AARVIND\mycode\mysite> python manage.py runserver
Performing system checks...

Unhandled exception in thread started by <function
check_errors.<locals>.wrapper at 0x02AC3F60>
Traceback (most recent call last):
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 542, in url_patte
rns
iter(patterns)
TypeError: 'module' object is not iterable
During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\autoreload.py",
line 225, in wrapper
fn(*args, **kwargs)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py",
li
ne 120, in inner_run
self.check(display_num_errors=True)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py",
line 364, in che
ck
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\commands\runserver.py",
li
ne 120, in inner_run
self.check(display_num_errors=True)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py",
line 364, in che
ck
include_deployment_checks=include_deployment_checks,
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py",
line 351, in _ru
n_checks
return checks.run_checks(**kwargs)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\registry.py",
line 73, in run_
checks

new_errors = check(app_configs=app_configs)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 13, in check_ur
l_config
return check_resolver(resolver)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 23, in check_re
solver
return check_method()
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 400, in check
warnings.extend(check_resolver(pattern))
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 23, in check_re
solver
return check_method()
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 399, in check
for pattern in self.url_patterns:
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\functional.py",
line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 549, in url_patte
rns
include_deployment_checks=include_deployment_checks,
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\management\base.py",
line 351, in _ru
n_checks
return checks.run_checks(**kwargs)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\registry.py",
line 73, in run_
checks

new_errors = check(app_configs=app_configs)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 13, in check_ur
l_config
return check_resolver(resolver)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 23, in check_re
solver
return check_method()
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 400, in check
warnings.extend(check_resolver(pattern))
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\core\checks\urls.py",
line 23, in check_re
solver
return check_method()
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 399, in check
for pattern in self.url_patterns:
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\utils\functional.py",
line 36, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File
"C:\Users\AARVIND\AppData\Local\Programs\Python\Python37-32\lib\site-packages\django\urls\resolvers.py",
line 549, in url_patte
rns
--
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/msgid/django-users/CAN%2BaYheU3%2Bdkv1gqWB8HW4zqFT%3DxpPsYihJmUbCbGGRhyRAgeA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Jason
2018-11-26 18:57:13 UTC
Permalink
whatever you have as url patterns is not a list, tuple or other iterable.
--
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/msgid/django-users/20504ff8-1711-4b9b-9b60-300083a8a60c%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Sanjay Malviya
2018-11-27 09:31:45 UTC
Permalink
What modification to codes required, pls in project mysite/mysite/polls(app)
polls/views.py
from django.http import httpresponse
def index(request):
return httpresponse('Hello, world, You're at the polls index')
polls/urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
mysite/mysite/urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]
Post by Jason
whatever you have as url patterns is not a list, tuple or other iterable.
--
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
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/20504ff8-1711-4b9b-9b60-300083a8a60c%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/20504ff8-1711-4b9b-9b60-300083a8a60c%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+***@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/msgid/django-users/CAN%2BaYhcmUXjGgSeGazYB3c99t0XpgF_y4ykA64ePm%2B_uFApx3g%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
shiva kumar
2018-11-27 16:24:05 UTC
Permalink
import polls in mysite/mysite/urls.py
i think it will work
Post by Sanjay Malviya
What modification to codes required, pls in project
mysite/mysite/polls(app)
polls/views.py
from django.http import httpresponse
return httpresponse('Hello, world, You're at the polls index')
polls/urls.py
from django.urls import path
from . import views
urlpatterns = [
path('', views.index, name='index'),
]
mysite/mysite/urls.py
from django.contrib import admin
from django.urls import include, path
urlpatterns = [
path('polls/', include('polls.urls')),
path('admin/', admin.site.urls),
]
Post by Jason
whatever you have as url patterns is not a list, tuple or other iterable.
--
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
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/20504ff8-1711-4b9b-9b60-300083a8a60c%40googlegroups.com
<https://groups.google.com/d/msgid/django-users/20504ff8-1711-4b9b-9b60-300083a8a60c%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
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/CAN%2BaYhcmUXjGgSeGazYB3c99t0XpgF_y4ykA64ePm%2B_uFApx3g%40mail.gmail.com
<https://groups.google.com/d/msgid/django-users/CAN%2BaYhcmUXjGgSeGazYB3c99t0XpgF_y4ykA64ePm%2B_uFApx3g%40mail.gmail.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+***@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/msgid/django-users/CAMsYeuFYvZkTvX67LkguVWAL_WjEBc2nZXfOcfmxJaTo5Oh4kQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.
Loading...