Разъяcните кто-нибудь, пожалуйста, как побороть столь досадную ошибку.
корневой urls.py
urlpatterns = patterns('',
...
url(r"projects/", include("apps.tasks", namespace="projects")),
)
apps/tasks/urls.py
...
urlpatterns = patterns('',
url(r"^(?P<project_id>\d+)/$", ProjectDetail.as_view(), name="project_detail"),
)
index.html
{% extends "base.html" %}
{% load staticfiles %}
{% block container %}
...
{% if projects_list %}
<div class="list-group">
{% for project in projects_list %}
<a class="list-group-item" href="{% url 'projects:project_detail' project.id %}">
{{ project.name }}
</a>
{% endfor %}
</div>
{% endif %}
...
{% endblock %}
При переходе на главнуюстраницу Django выдает странную ошибку:
ImproperlyConfigured at /
The included urlconf '<module 'apps.tasks' from
'/Volumes/UserData/xxx/data/project_name_venv/project/apps/tasks/__init__.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.