无法更改模块目录";没有名为';X'&引用;Python,Django

无法更改模块目录";没有名为';X'&引用;Python,Django,python,django,Python,Django,我正在做一个“论坛”应用程序,我正在从以下位置移动我的项目目录: rusc |-LinkMeta |-cela |-tag |-faq |-post |-resource |-rusc 至: rusc |-LinkMeta |-rusc |-cela |-tag |-faq |-post |-resource def ruscView(request): celas = Cela.objects.exclude(t

我正在做一个“论坛”应用程序,我正在从以下位置移动我的项目目录:

rusc
  |-LinkMeta
  |-cela
  |-tag
  |-faq
  |-post
  |-resource
  |-rusc
至:

rusc
 |-LinkMeta
 |-rusc
    |-cela
    |-tag
    |-faq
    |-post
    |-resource
def ruscView(request):
   celas = Cela.objects.exclude(tipus='X')
   #The celas object is created [<Cela: Pruebas>]


   notif=[]
   if request.user.is_authenticated():
       notif = request.user.notifications.unread()
   #No user, notif = [], skip if

   return render(request, "rusc.html", {'celas':celas,'notifications': notif})
#This goes to shorcuts.py render, heare :
    content = loader.render_to_string(template_name, context, request=request, using=using)
    (returns: No module named 'cela') 
    #Continues on loader.py line 66 method render_to_string
      #Who calls template = get_template(template_name, using=using) (loader.py line 29, with args('rusc.html', _dirs_undefined, None))
      #get_template calls engines wich returns a list with the correct folder of the template ('C:/Users/zartch/PycharmProjects/Django/rusc\\rusc\\cela\\templates') and returns correctly the template
      #returns to render_to_string and template.render(context, request) i wich is returning the error : "No module named 'cela'"
        #in django.py def render is giving the error when calls "self.template.render(context)"
          # in template\base.py the method render give me the HTML of the page who has to be displayed
          #This returns to render and give me {NoReverseMatch}Reverse for 'rusc.cela' with arguments '(1,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
      #Returns to render to string returning ({ImportError}No module named 'cela')
    #Then go to base.py get_response and because response= None rise the exception 
除了模块Cela,我对所有这些都做了,当我试图将Cela移到rusc中时,给了我一个错误:(在项目中更改了对Cela的引用之后)

如果我让塞拉回到巅峰状态,一切正常。 任何建议都将不胜感激

调试def ruscView(请求):

rusc
 |-LinkMeta
 |-rusc
    |-cela
    |-tag
    |-faq
    |-post
    |-resource
def ruscView(request):
   celas = Cela.objects.exclude(tipus='X')
   #The celas object is created [<Cela: Pruebas>]


   notif=[]
   if request.user.is_authenticated():
       notif = request.user.notifications.unread()
   #No user, notif = [], skip if

   return render(request, "rusc.html", {'celas':celas,'notifications': notif})
#This goes to shorcuts.py render, heare :
    content = loader.render_to_string(template_name, context, request=request, using=using)
    (returns: No module named 'cela') 
    #Continues on loader.py line 66 method render_to_string
      #Who calls template = get_template(template_name, using=using) (loader.py line 29, with args('rusc.html', _dirs_undefined, None))
      #get_template calls engines wich returns a list with the correct folder of the template ('C:/Users/zartch/PycharmProjects/Django/rusc\\rusc\\cela\\templates') and returns correctly the template
      #returns to render_to_string and template.render(context, request) i wich is returning the error : "No module named 'cela'"
        #in django.py def render is giving the error when calls "self.template.render(context)"
          # in template\base.py the method render give me the HTML of the page who has to be displayed
          #This returns to render and give me {NoReverseMatch}Reverse for 'rusc.cela' with arguments '(1,)' and keyword arguments '{}' not found. 0 pattern(s) tried: []
      #Returns to render to string returning ({ImportError}No module named 'cela')
    #Then go to base.py get_response and because response= None rise the exception 
def ruscView(请求):
celas=Cela.objects.exclude(tipus='X')
#celas对象已创建[]
notif=[]
if request.user.is_经过身份验证():
notif=request.user.notifications.unread()
#无用户,notif=[],如果
返回呈现(请求“rusc.html”,{'celas':celas,'notifications':notif})
#这将转到shorcuts.py渲染,请参见:
content=loader.render_to_string(模板名称、上下文、请求=请求、使用=使用)
(返回:没有名为“cela”的模块)
#在loader.py第66行上继续方法render_to_string
#谁调用template=get\u template(template\u name,using=using)(loader.py第29行,带args('rusc.html',\u dirs\u undefined,None))
#get_template调用引擎,返回一个包含模板正确文件夹的列表('C:/Users/zarch/PycharmProjects/Django/rusc\\rusc\\cela\\templates'),并正确返回模板
#返回render_to_字符串和模板。render(上下文,请求)i将返回错误:“没有名为'cela'的模块”
#在django.py中,当调用“self.template.render(context)”时,def render给出错误
#在template\base.py中,render方法为我提供必须显示的页面的HTML
#这将返回到render并为'rusc.cela'提供{NoReverseMatch}反向,参数为'(1,)'且未找到关键字参数{}。已尝试0个模式:[]
#返回渲染到返回的字符串({ImportError}没有名为“cela”的模块)
#然后转到base.py get_response,因为response=None会引发异常

rusc文件夹中是否有一个init_uuuuupy文件?是的,一个空的init_uuuupy文件,在rusc文件夹中有一些模块在工作。它应该是来自rusc.rusc import cela的
没有名为'rusc.rusc'的模块
,但奇怪的是,有rusc.post.models和rusc.faq.models,其他的工作正常。另外,Pycharm会找到模块。从cela.forms导入celaForm怎么样