简体   繁体   中英

Django 'module' object not callable

Hi I am working on a class project where I handle medical information. So I thought of using the INDIVO server for that. I am trying to install the indivo_ui_server. I am getting an error, I have installed the patterns package also. The package holds three files and a init .py. I am trying to install in windows .

在此处输入图片说明

The below code is urls.py :

from django.conf.urls import patterns
from django.conf.urls.defaults import include

urlpatterns = patterns('',
    # HARDCODED APP PATHS!! (keep in alpha order)
    (r'^apps/allergies/',       include('apps.allergies.urls')),
    (r'^apps/labs/',            include('apps.labs.urls')),
    (r'^apps/medications/',     include('apps.medications.urls')),
    (r'^apps/problems/',        include('apps.problems.urls')),
    (r'^', include('ui.urls'))  # Everything else to indivo
)

The below code is __init__.py (from patterns package):

def patterns(func):
    empty_argspec = inspect.ArgSpec(args=[], varargs=None, keywords=None, defaults=None)
    assert inspect.getargspec(func) == empty_argspec, 'Pattern function should not have arguments'

    # TODO: make it not as weird and dirty
    func.__globals__['Mismatch'] = Mismatch

    tree = get_ast(func)
    transform_function(tree.body[0])
    return compile_func(func, tree)

Can anyone explain me why I am getting this error.

I have also tried suggestions from link 1 and link 2

Traceback:

在此处输入图片说明

只需从urls.py导入所有内容即可解决导入问题

from django.conf.urls import *

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM