Forums

Django URLS not working

Hi guys, my URLS in templates aren't working anymore. They were working yesterday, so I was wondering if this is something to do with the server? Can't seem to figure it out, thanks (and apologies for the awful formatting of below): <br/>

ImproperlyConfigured at / The included urlconf <property object at 0x7f5b28326db8> doesn't have any patterns in it Request Method: GET Request URL: http://beta1.d2think.com/ Django Version: 1.6.6 Exception Type: ImproperlyConfigured Exception Value: The included urlconf <property object at 0x7f5b28326db8> doesn't have any patterns in it Exception Location: /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in url_patterns, line 369 Python Executable: /usr/local/bin/uwsgi Python Version: 3.3.6 Python Path: ['/var/www', '.', '', '/home/NuovoVesuvio/.local/lib/python3.3/site-packages', '/usr/local/lib/python3.3/dist-packages/setuptools-7.0-py3.3.egg', '/usr/local/lib/python3.3/dist-packages/matplotlib-1.3.1-py3.3-linux-x86_64.egg', '/usr/local/lib/python3.3/dist-packages/certifi-14.05.14-py3.3.egg', '/var/www', '/usr/lib/python3.3', '/usr/lib/python3.3/plat-x86_64-linux-gnu', '/usr/lib/python3.3/lib-dynload', '/usr/local/lib/python3.3/dist-packages', '/usr/lib/python3/dist-packages', '/home/NuovoVesuvio/DareToThink'] Server time: Fri, 9 Jan 2015 11:05:13 +0000 Error during template rendering

In template /home/NuovoVesuvio/DareToThink/DareToThink/templates/navbar.html, error at line 10 The included urlconf <property object at 0x7f5b28326db8> doesn't have any patterns in it 1   <div class = "row"> 2                   <nav class="navbar navbar-inverse navbar-fixed-top" id="topnavbar"> 3                       <div class="container-fluid"> 4  <div class="navbar-header"> 5                              <button type="button" class="navbar-toggle" data-toggle="collapse" data-target="#myNavbar"> 6                                   <span class="icon-bar"></span> 7                                    <span class="icon-bar"></span> 8                                    <span class="icon-bar"></span> 9                                </button> 10       {% block navindex %} <a class="navbar-brand" href="{% url 'indextemplate' %}">Dare To Think</a> {% endblock %} 11                   </div> 12                            <div class="collapse navbar-collapse" id="myNavbar"> 13  14  15                             <ul class="nav navbar-nav"> 16                                  {% block navresearch %}<li><a href="#">Research </a></li>{% endblock %} 17                                  {% block navblog %}<li><a href="{% url 'userprofile_blog' %}">Blog</a></li>{% endblock %} 18                 {% block navabout %}<li><a href="{% url 'about' %}">About</a></li>{% endblock %} 19                                </ul> 20     Traceback Switch to copy-and-paste view

/usr/local/lib/python3.3/dist-packages/django/core/handlers/base.py in get_response
                response = response.render() ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/response.py in render
            self.content = self.rendered_content ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/response.py in rendered_content
        content = template.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
            return self._render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in
_render
        return self.nodelist.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
                bit = self.render_node(node, context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/debug.py in render_node
            return node.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/loader_tags.py in render
        return compiled_parent._render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in
_render
        return self.nodelist.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
                bit = self.render_node(node, context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/debug.py in render_node
            return node.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/loader_tags.py in render
        return self.render_template(self.template, context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/loader_tags.py in render_template
        output = template.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
            return self._render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in
_render
        return self.nodelist.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
                bit = self.render_node(node, context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/debug.py in render_node
            return node.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/loader_tags.py in render
            result = self.nodelist.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/base.py in render
                bit = self.render_node(node, context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/debug.py in render_node
            return node.render(context) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/template/defaulttags.py in render
            url = reverse(view_name, args=args, kwargs=kwargs, current_app=context.current_app) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in reverse
    return iri_to_uri(resolver._reverse_with_prefix(view, prefix, *args, **kwargs)) ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in
_reverse_with_prefix
            self._populate() ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in
_populate
                    for name in pattern.reverse_dict: ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in reverse_dict
            self._populate() ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in
_populate
        for pattern in reversed(self.url_patterns): ...  Local vars /usr/local/lib/python3.3/dist-packages/django/core/urlresolvers.py in url_patterns
            raise ImproperlyConfigured("The included urlconf %s doesn't have any patterns in it" % self.urlconf_name) ...  Local vars Request information

GET No GET data POST No POST data FILES No FILES data COOKIES Variable  Value
__qca    'P0-784790535-1415352788058' csrftoken  'LK51wXMps8BbeRL2DQ2ybygOqOHGxAAM' sessionid    'e09ninq71eljnz9rpeqtuxnbuqgb0fyf' BCSI-CS-997ed7499a2363c4     '2' META Variable  Value HTTP_X_REAL_IP     '80.169.170.10' DOCUMENT_ROOT   '/usr/local/openresty/nginx/html' wsgi.errors   <uwsgi_file__bin_user_wsgi_wrapper.ErrorLogFile object at 0x7f5b2a7abed0> wsgi.file_wrapper     '' HTTP_COOKIE  '__qca=P0-784790535-1415352788058; sessionid=e09ninq71eljnz9rpeqtuxnbuqgb0fyf; csrftoken=LK51wXMps8BbeRL2DQ2ybygOqOHGxAAM; BCSI-CS-997ed7499a2363c4=2' CONTENT_LENGTH   '' wsgi.multiprocess    True REQUEST_METHOD     'GET' SERVER_PORT   '80' REQUEST_URI    '/' QUERY_STRING    '' HTTP_HOST    'beta1.d2think.com' uwsgi.version   b'2.0.5.1' SERVER_NAME  'beta1.d2think.com' wsgi.multithread    False CONTENT_TYPE  '' HTTP_ACCEPT_LANGUAGE     'en-GB,en-US;q=0.8,en;q=0.6' wsgi.version   (1, 0) HTTP_X_BLUECOAT_VIA  'af1da519007b80b7' HTTP_X_FORWARDED_FOR     '80.169.170.10' HTTP_CACHE_CONTROL  'max-stale=0' HTTP_CONNECTION   'close' PATH_INFO   '/' REMOTE_PORT     '55918' HTTP_ACCEPT     'text/html,application/xhtml+xml,application/xml;q=0.9,image/webp,*/*;q=0.8' wsgi.input     <uwsgi._Input object at 0x7f5b29081888> HTTP_USER_AGENT     'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/39.0.2171.95 Safari/537.36' CSRF_COOKIE  'LK51wXMps8BbeRL2DQ2ybygOqOHGxAAM' HTTP_ACCEPT_ENCODING     'gzip, deflate, sdch' SCRIPT_NAME   '' SERVER_PROTOCOL  'HTTP/1.1' wsgi.run_once    False uwsgi.node    b'glenn-liveweb4' REMOTE_ADDR   '10.190.154.117' wsgi.url_scheme    'http' Settings Using settings module DareToThink.settings Setting Value CACHES     {'default': {'BACKEND': 'django.core.cache.backends.locmem.LocMemCache'}} USE_TZ    True SECRET_KEY     '********************' TEMPLATE_DIRS    ('/home/NuovoVesuvio/DareToThink/DareToThink/templates/',  '/home/NuovoVesuvio/DareToThink/userprofile/templates/',  '/home/NuovoVesuvio/DareToThink/DareToThink/templates/myadmin/') EMAIL_HOST    'localhost' AUTH_PROFILE_MODULE     'userprofile.UserProfile' LOGGING   {} CSRF_FAILURE_VIEW    'django.views.csrf.csrf_failure' SEND_BROKEN_LINK_EMAILS    False SIGNING_BACKEND   'django.core.signing.TimestampSigner' THOUSAND_SEPARATOR    ',' DEFAULT_FILE_STORAGE    'django.core.files.storage.FileSystemStorage' CACHE_MIDDLEWARE_KEY_PREFIX   '********************' STATICFILES_DIRS     ('/usr/local/lib/python3.4/dist-packages/django/contrib/admin/static/admin/', 'home/NuovoVesuvio/profileimages/') SHORT_DATETIME_FORMAT     'm/d/Y P' TEMPLATE_CONTEXT_PROCESSORS   ['django.core.context_processors.request',  'django.contrib.auth.context_processors.auth'] FILE_UPLOAD_PERMISSIONS  None DEFAULT_EXCEPTION_REPORTER_FILTER  'django.views.debug.SafeExceptionReporterFilter' SESSION_COOKIE_DOMAIN  None STATIC_URL     '/static/' BASE_DIR     '/home/NuovoVesuvio/DareToThink' DEBUG  True CSRF_COOKIE_DOMAIN     None FILE_UPLOAD_TEMP_DIR   None LANGUAGES_BIDI     ('he', 'ar', 'fa', 'ur') USE_X_FORWARDED_HOST   False ALLOWED_INCLUDE_ROOTS     () LANGUAGE_COOKIE_NAME     'django_language' SECURE_PROXY_SSL_HEADER   None MIDDLEWARE_CLASSES     ('django.contrib.sessions.middleware.SessionMiddleware',  'django.middleware.common.CommonMiddleware',  'django.middleware.csrf.CsrfViewMiddleware',  'django.contrib.auth.middleware.AuthenticationMiddleware',  'django.contrib.messages.middleware.MessageMiddleware',  'django.middleware.clickjacking.XFrameOptionsMiddleware') TIME_FORMAT    'P' DEFAULT_INDEX_TABLESPACE    '' FORMAT_MODULE_PATH   None CSRF_COOKIE_NAME   'csrftoken' MEDIA_URL   '' LANGUAGES    (('af', 'Afrikaans'),  ('ar', 'Arabic'),  ('az', 'Azerbaijani'),  ('bg', 'Bulgarian'),  ('be', 'Belarusian'),  ('bn', 'Bengali'),  ('br', 'Breton'),  ('bs', 'Bosnian'),  ('ca', 'Catalan'),  ('cs', 'Czech'),  ('cy', 'Welsh'),  ('da', 'Danish'),  ('de', 'German'),  ('el', 'Greek'),  ('en', 'English'),  ('en-gb', 'British English'),  ('eo', 'Esperanto'),  ('es', 'Spanish'),  ('es-ar', 'Argentinian Spanish'),  ('es-mx', 'Mexican Spanish'),  ('es-ni', 'Nicaraguan Spanish'),  ('es-ve', 'Venezuelan Spanish'),  ('et', 'Estonian'),  ('eu', 'Basque'),  ('fa', 'Persian'),  ('fi', 'Finnish'),  ('fr', 'French'),  ('fy-nl', 'Frisian'),  ('ga', 'Irish'),  ('gl', 'Galician'),  ('he', 'Hebrew'),  ('hi', 'Hindi'),  ('hr', 'Croatian'),  ('hu', 'Hungarian'),  ('ia', 'Interlingua'),  ('id', 'Indonesian'),  ('is', 'Icelandic'),  ('it', 'Italian'),  ('ja', 'Japanese'),  ('ka', 'Georgian'),  ('kk', 'Kazakh'),  ('km', 'Khmer'),  ('kn', 'Kannada'),  ('ko', 'Korean'),  ('lb', 'Luxembourgish'),  ('lt', 'Lithuanian'),  ('lv', 'Latvian'),  ('mk', 'Macedonian'),  ('ml', 'Malayalam'),  ('mn', 'Mongolian'),  ('my', 'Burmese'),  ('nb', 'Norwegian Bokmal'),  ('ne', 'Nepali'),  ('nl', 'Dutch'),  ('nn', 'Norwegian Nynorsk'),  ('os', 'Ossetic'),  ('pa', 'Punjabi'),  ('pl', 'Polish'),  ('pt', 'Portuguese'),  ('pt-br', 'Brazilian Portuguese'),  ('ro', 'Romanian'),  ('ru', 'Russian'),  ('sk', 'Slovak'),  ('sl', 'Slovenian'),  ('sq', 'Albanian'),  ('sr', 'Serbian'),  ('sr-latn', 'Serbian Latin'),  ('sv', 'Swedish'),  ('sw', 'Swahili'),  ('ta', 'Tamil'),  ('te', 'Telugu'),  ('th', 'Thai'),  ('tr', 'Turkish'),  ('tt', 'Tatar'),  ('udm', 'Udmurt'),  ('uk', 'Ukrainian'),  ('ur', 'Urdu'),  ('vi', 'Vietnamese'),  ('zh-cn', 'Simplified Chinese'),  ('zh-tw', 'Traditional Chinese')) MONTH_DAY_FORMAT     'F j' FIRST_DAY_OF_WEEK     0 SESSION_SAVE_EVERY_REQUEST    False LOCALE_PATHS  () SESSION_CACHE_ALIAS  'default' SOUTH_DATABASE_ADAPTERS   {'default': 'south.db.mysql'} SESSION_EXPIRE_AT_BROWSER_CLOSE   False USE_ETAGS     False APPEND_SLASH  True LOGOUT_URL     '/accounts/logout/' PROFANITIES_LIST    '********************' ROOT_URLCONF     'DareToThink.urls' WSGI_APPLICATION     'DareToThink.wsgi.application' TIME_INPUT_FORMATS   ('%H:%M:%S', '%H:%M:%S.%f', '%H:%M') SESSION_COOKIE_AGE     1209600 SESSION_ENGINE  'django.contrib.sessions.backends.db' DISALLOWED_USER_AGENTS    () CACHE_MIDDLEWARE_SECONDS     600 LOGGING_CONFIG  'django.utils.log.dictConfig' YEAR_MONTH_FORMAT     'F Y' LOGIN_URL     '/login/' EMAIL_SUBJECT_PREFIX  '[Django] ' SESSION_FILE_PATH   None DEFAULT_CONTENT_TYPE   'text/html' DEFAULT_TABLESPACE  '' TEMPLATE_LOADERS     ('django.template.loaders.filesystem.Loader',  'django.template.loaders.app_directories.Loader') ADMINS     () DEFAULT_FROM_EMAIL   'webmaster@localhost' ABSOLUTE_URL_OVERRIDES    {} LANGUAGE_CODE    'en-us' EMAIL_HOST_PASSWORD     '********************' FILE_UPLOAD_HANDLERS     ('django.core.files.uploadhandler.MemoryFileUploadHandler',  'django.core.files.uploadhandler.TemporaryFileUploadHandler') CSRF_COOKIE_SECURE   False INSTALLED_APPS    ('django.contrib.admin',  'django.contrib.auth',  'django.contrib.contenttypes',  'django.contrib.sessions',  'django.contrib.messages',  'django.contrib.staticfiles',  'DareToThink',  'userprofile',  'bootstrapform') EMAIL_PORT    25 ALLOWED_HOSTS    [] DATE_INPUT_FORMATS   ('%Y-%m-%d',  '%m/%d/%Y',  '%m/%d/%y',  '%b %d %Y',  '%b %d, %Y',  '%d %b %Y',  '%d %b, %Y',  '%B %d %Y',  '%B %d, %Y',  '%d %B %Y',  '%d %B, %Y') DECIMAL_SEPARATOR    '.' FORCE_SCRIPT_NAME   None FILE_CHARSET   'utf-8' SESSION_COOKIE_NAME     'sessionid' MESSAGE_STORAGE     'django.contrib.messages.storage.fallback.FallbackStorage' FIXTURE_DIRS     () PREPEND_WWW  False USE_I18N  True SESSION_COOKIE_SECURE  False STATICFILES_FINDERS   ('django.contrib.staticfiles.finders.FileSystemFinder',  'django.contrib.staticfiles.finders.AppDirectoriesFinder') IGNORABLE_404_URLS  () SERVER_EMAIL     'root@localhost' SETTINGS_MODULE    'DareToThink.settings' SHORT_DATE_FORMAT    'm/d/Y' EMAIL_BACKEND   'django.core.mail.backends.smtp.EmailBackend' SESSION_COOKIE_PATH   '/' INTERNAL_IPS    () SESSION_COOKIE_HTTPONLY  True X_FRAME_OPTIONS    'SAMEORIGIN' USE_THOUSAND_SEPARATOR     False TEMPLATE_STRING_IF_INVALID    '' COMMENTS_ALLOW_PROFANITIES   False TEMPLATE_DEBUG    True EMAIL_HOST_USER    '' MANAGERS     () DEBUG_PROPAGATE_EXCEPTIONS   False TEST_RUNNER   'django.test.runner.DiscoverRunner' EMAIL_USE_TLS   False DATETIME_FORMAT   'N j, Y, P' DEFAULT_CHARSET     'utf-8' TRANSACTIONS_MANAGED    False STATICFILES_STORAGE   'django.contrib.staticfiles.storage.StaticFilesStorage' AUTHENTICATION_BACKENDS     ('django.contrib.auth.backends.ModelBackend',) USE_L10N     True AUTH_USER_MODEL    'auth.User' LOGIN_REDIRECT_URL  '/accounts/profile/' TIME_ZONE  'GMT' CSRF_COOKIE_HTTPONLY  False SESSION_SERIALIZER    'django.contrib.sessions.serializers.JSONSerializer' STATIC_ROOT    '/home/NuovoVesuvio/DareToThink/static' CSRF_COOKIE_PATH    '/' PASSWORD_HASHERS    '********************' ADMIN_FOR    () NUMBER_GROUPING  0 PASSWORD_RESET_TIMEOUT_DAYS   '********************' MEDIA_ROOT   '/home/NuovoVesuvio/DareToThink/media' CACHE_MIDDLEWARE_ALIAS   'default' DATABASE_ROUTERS  [] DATETIME_INPUT_FORMATS   ('%Y-%m-%d %H:%M:%S',  '%Y-%m-%d %H:%M:%S.%f', '%Y-%m-%d %H:%M',  '%Y-%m-%d',  '%m/%d/%Y %H:%M:%S',  '%m/%d/%Y %H:%M:%S.%f',  '%m/%d/%Y %H:%M',  '%m/%d/%Y',  '%m/%d/%y %H:%M:%S',  '%m/%d/%y %H:%M:%S.%f',  '%m/%d/%y %H:%M',  '%m/%d/%y') DATABASES   {'default': {'ATOMIC_REQUESTS': False,
             'AUTOCOMMIT': True,
             'CONN_MAX_AGE': 0,
             'ENGINE': 'mysql.connector.django',
             'HOST': 'mysql.server',
             'NAME': 'NuovoVesuvio$Test2',
             'OPTIONS': {},
             'PASSWORD': '********************',
             'PORT': '',
             'TEST_CHARSET': None,
             'TEST_COLLATION': None,
             'TEST_MIRROR': None,
             'TEST_NAME': None,
             'TIME_ZONE': 'UTC',
             'USER': 'NuovoVesuvio'}} FILE_UPLOAD_MAX_MEMORY_SIZE    2621440 DATE_FORMAT     'N j, Y' You're seeing this error because you have DEBUG = True in your Django settings file. Change that to False, and Django will display a standard 500 page.

Hi Nuovo,

I see that you have made some edits two days ago to the urls.py file and other files. Did you reload your webapp right after you made your edits? If you did not reload, then it is likely that some changes that you made then are causing this error.

Conrad