XXI project Django3.0 learning directory consolidation

First, under the project New apps directory, app items they contain are put to the apps folder

 

 Hover the mouse on apps right click and select Mark Directory as -> Sources Root clicks

Second, placement

In settings.py add:

# Add apps directory 
sys.path.insert (0, the os.path.join (base_dir, ' apps ' ))

 

Guess you like

Origin www.cnblogs.com/chushujin/p/12574466.html