Well, I came across a problem with import and a Django application that has a hyphen in its name.
As far as I know, hyphens are not even allowed in Django application names, but they still exist and the site works without errors. I donโt know at all how the application was created, since the project already existed when I started working on it. (This is a Django CMS project if it changes btw something)
Now the problem is that when I want to import something in the shell or in the project, I canโt just write from my-app import module, because it always throws an error due to hypen.
Also INSTALLED_APPSlisted in it using hypenINSTALLED_APPS = ('my-app')
So how can I fix this and make it usable? I was thinking about renaming, but I really don't know the consequences, and I also do not want to break anything in CMS (I am still learning Django, and CMS is very new to me)
source
share