Firstly I installed Django using pip in my "CentOS" operating system. After that I performed these steps using terminal.
django-admin startproject mysite
a folder mysite is created with :
manage.py and another subfolder mysite
Then simply I just used these commands :
python manage.py runserver
and the server was running as clicked on the url : http://localhost:portnumber/
But after that when I made another app to run it is not running, my step are as follows :
python manage.py startapp webapp
Then one new folder created webapp in same mysite directory is created.
After changing settings.py and urls.py of mysite and also changing urls.py and views.py of webapp.
when I run :
python manage.py runserver
error is coming
Performing system checks...
Unhandled exception in thread started by <function wrapper at 0x24a7398>
Traceback (most recent call last):
File "/usr/lib/python2.7/site-packages/django/utils/autoreload.py", line
226, in wrapper
fn(*args, **kwargs)
File "/usr/lib/python2.7/site-
packages/django/core/management/commands/runserver.py", line 121, in
inner_run
self.check(display_num_errors=True)
File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
line 374, in check
include_deployment_checks=include_deployment_checks,
File "/usr/lib/python2.7/site-packages/django/core/management/base.py",
line 361, in _run_checks
return checks.run_checks(**kwargs)
File "/usr/lib/python2.7/site-packages/django/core/checks/registry.py",
line 81, in run_checks
new_errors = check(app_configs=app_configs)
File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line
14, in check_url_config
return check_resolver(resolver)
File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line
28, in check_resolver
warnings.extend(check_resolver(pattern))
File "/usr/lib/python2.7/site-packages/django/core/checks/urls.py", line
24, in check_resolver
for pattern in resolver.url_patterns:
File "/usr/lib/python2.7/site-packages/django/utils/functional.py", line
35, in __get__
res = instance.__dict__[self.name] = self.func(instance)
File "/usr/lib/python2.7/site-packages/django/urls/resolvers.py", line
322, in url_patterns
raise ImproperlyConfigured(msg.format(name=self.urlconf_name))
django.core.exceptions.ImproperlyConfigured: The included URLconf
'<module 'webapp.urls' from
'/home/username/Desktop/prog/django/mysite/webapp/urls.pyc'>' does not
appear to have any patterns in it. If you see valid patterns in the file
then the issue is probably caused by a circular import.