Estoy intentando crear una vista en Django y al hacer el runserver me da el siguiente error:
> Performing system checks...
>
> Unhandled exception in thread started by <function wrapper at
> 0x0000000004523278> Traceback (most recent call last): File
> "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\utils\autoreload.py",
> line 226, in wrapper
> fn(*args, **kwargs) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\management\commands\runserver.py",
> line 121, in inner_run
> self.check(display_num_errors=True) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\management\base.py",
> line 374, in check
> include_deployment_checks=include_deployment_checks, File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\management\base.py",
> line 361, in _run_checks
> return checks.run_checks(**kwargs) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\checks\registry.py",
> line 81, in run_checks
> new_errors = check(app_configs=app_configs) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\checks\urls.py",
> line 14, in check_url_config
> return check_resolver(resolver) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\core\checks\urls.py",
> line 24, in check_resolver
> for pattern in resolver.url_patterns: File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\utils\functional.py",
> line 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\urls\resolvers.py",
> line 313, in url_patterns
> patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module) File
> "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\utils\functional.py",
> line 35, in __get__
> res = instance.__dict__[self.name] = self.func(instance) File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\urls\resolvers.py",
> line 306, in urlconf_module
> return import_module(self.urlconf_name) File "C:\Python27\lib\importlib\__init__.py", line 37, in import_module
> __import__(name) File "C:\Users\Manux\Desktop\probardjango\src\pdj\urls.py", line 21, in
> <module>
> url(r'', 'boletin.views.incio', name='inicio'), File "C:\Python27\lib\site-packages\django-1.10.6-py2.7.egg\django\conf\urls\__init__.py",
> line 85, in url
> raise TypeError('view must be a callable or a list/tuple in the case of include().') TypeError: view must be a callable or a
> list/tuple in the case of include().
Archivo 'views.py':
from django.shortcuts import render
# Create your views here.
def inicio(request):
return render(request, "inicio.html", {})
Archivo 'urls.py':
from django.conf.urls import url
from django.contrib import admin
urlpatterns = [
url(r'^admin/', admin.site.urls),
url(r'', 'boletin.views.incio', name='inicio'),
]
Archivo 'settings.py':
INSTALLED_APPS = [
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
'django.contrib.sessions',
'django.contrib.messages',
'django.contrib.staticfiles',
'boletin',
]
ROOT_URLCONF = 'pdj.urls'
TEMPLATES = [
{
'BACKEND': 'django.template.backends.django.DjangoTemplates',
'DIRS': [os.path.join(BASE_DIR, "templates")],
'APP_DIRS': True,
'OPTIONS': {
'context_processors': [
'django.template.context_processors.debug',
'django.template.context_processors.request',
'django.contrib.auth.context_processors.auth',
'django.contrib.messages.context_processors.messages',
],
},
},
]
Espero que me podáis ayudar, gracias de antemano y un saludo.
boletin.urls