خرید بک لینک

Vote count: 0

I'm getting a the url conf correct for my web app, and I'm at a loose end.

I think the idea behind django-subdomains is that the subdomain routing is stored in the SUBDOMAIN_URLCONFS

ROOT_URLCONF = 'creativeflow'
# A dictionary of urlconf module paths, keyed by their subdomain.
SUBDOMAIN_URLCONFS = {
    None: ROOT_URLCONF + '.urls',  # no subdomain, e.g. ``example.com``
    'www': ROOT_URLCONF + '.urls',
    'blog': 'blog.urls',
}

Then my creativeflow.urls and blog.urls are:

"""Creativeflow URL Configuration."""
from django.conf.urls import url
from django.contrib import admin

urlpattes = [
    url(r'^admin/', admin.site.urls, name="admin"),
]

And

"""Creativeflow URL Configuration the blog app."""
from django.conf.urls import url
from .views import BlogListView
urlpattes = [
    url(r'posts/^(?P<year>d{4})/(?P<months>d{2}|w{3})/(?P<day>d{2})',
        BlogListView.as_view(paginate_by=25), name="blog-list-view")
]

The error I'm seeing is:

Unhandled exception in thread started by <function check_errors.<locals>.wrapper at 0x046FA618>
Traceback (most recent call last):
  File "D:creativeflowmyvenvlibsite-packagesdjangocoreurlresolvers.py", line 419, in url_pattes
    iter(pattes)
TypeError: 'module' object is not iterable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "D:creativeflowmyvenvlibsite-packagesdjangoutilsautoreload.py", line 226, in wrapper
    fn(*args, **kwargs)
  File "D:creativeflowmyvenvlibsite-packagesdjangocoremanagementcommandsrunserver.py", line 116, in ier_run
    self.check(display_num_errors=True)
  File "D:creativeflowmyvenvlibsite-packagesdjangocoremanagementbase.py", line 426, in check
    include_deployment_checks=include_deployment_checks,
  File "D:creativeflowmyvenvlibsite-packagesdjangocorechecksregistry.py", line 75, in run_checks
    new_errors = check(app_configs=app_configs)
  File "D:creativeflowmyvenvlibsite-packagesdjangocorechecksurls.py", line 13, in check_url_config
    retu check_resolver(resolver)
  File "D:creativeflowmyvenvlibsite-packagesdjangocorechecksurls.py", line 23, in check_resolver
    for patte in resolver.url_pattes:
  File "D:creativeflowmyvenvlibsite-packagesdjangoutilsfunctional.py", line 33, in __get__
    res = instance.__dict__[self.name] = self.func(instance)
  File "D:creativeflowmyvenvlibsite-packagesdjangocoreurlresolvers.py", line 426, in url_pattes
    raise ImproperlyConfigured(msg.format(name=self.urlconf_name))
django.core.exceptions.ImproperlyConfigured: The included URLconf 'creativeflow' does not appear to have any pattes in
 it. If you see valid pattes in the file then the issue is probably caused by a circular import.

I'm assuming that, as you can see, I have an urlpattes in both urls.py. So I must have a circular reference. But I've followed the imports from through views.py and models.py and I don't see anything that would cause a circular dependency problem.

How do I resolve this/and find the circular dependency?

asked 57 secs ago

- - , .
.

برچسب: نویسنده: استخدام کار تاريخ: دوشنبه 21 تير 1395 ساعت: 0:20

صفحه بندی