Application Structure

이다연·2021년 3월 8일
0

Django

목록 보기
8/33

It is a good idea is to call the project folder project and place applications in project/apps/. Then, place all application dependencies into their own subfolders.

Examples:

Static files: project/apps/appname/static/appname/
Template tags: project/apps/appname/templatetags/appname.py
Template files: project/apps/appname/templates/appname/


Using such a structure, you can at any moment export the application into another Python package and use it again. You can even publish it in PyPi as an open source package, or move it to another folder.

You’ll end up with a project structure like this:

https://www.toptal.com/django/django-top-10-mistakes

profile
Dayeon Lee | Django & Python Web Developer

0개의 댓글