Witosser
@Witosser
студент IT ВУЗа, увлекаюсь веб-разработкой

Почему не подключается приложение?

Подключаю приложение: simpleblog
Список подключённых приложений:

INSTALLED_APPS = [

    'django.contrib.admin',
    'django.contrib.auth',
    'django.contrib.contenttypes',
    'django.contrib.sessions',
    'django.contrib.messages',
    'django.contrib.staticfiles',
    'simpleblog',
    'simplemathcaptcha',
    'el_pagination',
    'markdown_deux',
    'pagedown',
]

Код ошибки
Unhandled exception in thread started by <_pydev_bundle.pydev_monkey._NewThreadStartupWithTrace object at 0x04E0E870>
Traceback (most recent call last):
  File "C:\Users\Витор\AppData\Roaming\JetBrains\PyCharm 2016.1.2\helpers\pydev\_pydev_bundle\pydev_monkey.py", line 553, in __call__
    return self.original_func(*self.args, **self.kwargs)
  File "C:\Python35\lib\site-packages\django\utils\autoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "C:\Python35\lib\site-packages\django\core\management\commands\runserver.py", line 121, in inner_run
    self.check(display_num_errors=True)
  File "C:\Python35\lib\site-packages\django\core\management\base.py", line 374, in check
    include_deployment_checks=include_deployment_checks,
  File "C:\Python35\lib\site-packages\django\core\management\base.py", line 361, in _run_checks
    return checks.run_checks(**kwargs)
  File "C:\Python35\lib\site-packages\django\core\checks\registry.py", line 81, in run_checks
    new_errors = check(app_configs=app_configs)
  File "C:\Python35\lib\site-packages\django\core\checks\urls.py", line 14, in check_url_config
    return check_resolver(resolver)
  File "C:\Python35\lib\site-packages\django\core\checks\urls.py", line 24, in check_resolver
    for pattern in resolver.url_patterns:
  File "C:\Python35\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Python35\lib\site-packages\django\urls\resolvers.py", line 313, in url_patterns
    patterns = getattr(self.urlconf_module, "urlpatterns", self.urlconf_module)
  File "C:\Python35\lib\site-packages\django\utils\functional.py", line 35, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "C:\Python35\lib\site-packages\django\urls\resolvers.py", line 306, in urlconf_module
    return import_module(self.urlconf_name)
  File "C:\Python35\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_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "C:/Users/Витор/PycharmProjects/untitled12\untitled12\urls.py", line 21, in <module>
    url(r'^blog/', 'simpleblog.urls'),
  File "C:\Python35\lib\site-packages\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().


Делаю по мануалу https://github.com/drager/django-simple-blog
  • Вопрос задан
  • 1167 просмотров
Пригласить эксперта
Ответы на вопрос 1
fox_12
@fox_12 Куратор тега Django
Расставляю биты, управляю заряженными частицами
Вероятно - его нужно подключать так в C:/Users/Витор/PycharmProjects/untitled12\untitled12\urls.py:

(r'^simpleblog/', include('simpleblog.urls')),
Ответ написан
Ваш ответ на вопрос

Войдите, чтобы написать ответ

Похожие вопросы