티스토리 뷰

Django

#1.1. Project structure

알 수 없는 사용자 2019. 2. 27. 00:08

Last post, we created project folder named 'conf'. There are 4 python files.

  • __init__.py
  • settings.py
  • urls.py
  • wsgi.py
__init__.py is a file required by Python. Python requires initialization when reading modules, this initialization is done in this file.

settings.py is a file that contains all the website settings. This is where we register any applications we create, the location of our static files, database configuration details.

urls.py is a file that defines the site url to view mappings. While this could contain all the url mapping code. it is more common to delegate some of the mapping to particular applications, as we'll see later.
The file consists of the following :

1
2
3
4
5
6
from django.contrib import admin
from django.urls import path
 
urlpatterns = [
    path('admin/', admin.site.urls),
]
cs
I'll explain this when I create any app and link up it.

wsgi is main deployment platform of Django.
I'll explain this file next.

I don't know about these files yet, but I think I'll find out more about them when I make a website. So I wrote about 'Django project structure' in this post. next post is 'create app and app structure'.

Thank you for watching this post.



'Django' 카테고리의 다른 글

#2. create application and its structure  (0) 2019.02.27
#1. Set up Django development envrionment in Windows 10  (0) 2019.02.25
#0. Django?  (0) 2019.02.25
댓글
공지사항
최근에 올라온 글
최근에 달린 댓글
Total
Today
Yesterday
링크
«   2025/09   »
1 2 3 4 5 6
7 8 9 10 11 12 13
14 15 16 17 18 19 20
21 22 23 24 25 26 27
28 29 30
글 보관함