상속5 장고(django) 태그 taggit - 파이썬 장고를 활용한 쉽고 빠른 웹 개발 프로그래밍 Getting Started — django-taggit 1.3.0 documentation Add "taggit" to your project’s INSTALLED_APPS setting. Run ./manage.py migrate. Note If you want django-taggit to be CASE-INSENSITIVE when looking up existing tags, you’ll have to set TAGGIT_CASE_INSENSITIVE (in settings.py or wherever you have your Dj django-taggit.readthedocs.io pip install django-taggit GitHub - fizista/django-taggit-templat.. 2022. 1. 17. 장고(django) 프로젝트 첫 페이지, 템플릿 상속 - 파이썬 장고를 활용한 쉽고 빠른 웹 개발 프로그래밍 URL 설정 mysite/urls.py ... from mysite.views import HomeView # 홈페이지 urlpatterns = [ ... # 홈페이지 path('',HomeView.as_view(), name='home'), # 루트 URL , 패턴명 = 'home' ] View 설정 단순히 템플릿만 보여주는 로직 mysite/views.py # 홈페이지 from django.views.generic import TemplateView class HomeView(TemplateView): template_name = 'home.html' TemplateView 제네릭 뷰 상속 settings.py TEMPLATES = [ { 'BACKEND': 'django.template.backen.. 2022. 1. 11. Strategy Pattern ㅡ 행위, 행동(Behavior)을 인터페이스로 추상화 시켜 구성(composition)을 통해 행동들을 사용 | Design Pattern 디자인 패턴 Strategy Pattern 클래스별로 캡슐화되어 있는 객체들을 교체할 수 있도록 함으로써 같은 작업을 다른 알고리즘으로 사용할 수 있도록 하는 패턴 Strategy 클래스 내 각각 캡슐화 그리고 구성을 통해 알고리즘 바꿀 수 있다. Strategy Pattern 은 클라이언트가 독립적으로 다양한 알고리즘을 사용한다. 다형성을 이용하여 특정 객체에 종속되지 않도록 한다. 다른 부분을 분리하여 캡슐화한다. 상속하지 않는 대신 인터페이스를 통해 캡슐화(추상화)한다. (상속 대신 구성 사용) 분리된 strategies 인터페이스에서 behaviors(행동)이 정의된다. behavior 과 behavior을 사용하는 class 사이에는 더 나은 decoupling 이다. Behaviors 는 런타임시에도 변경.. 2021. 11. 4. [Kotlin] Fast campus 강의 안드로이드 앱 개발 코틀린 / 클래스(class), 객체지향(OOP), 다형성 (polymorphism) 안드로이드 앱 개발 코틀린편. 객체지향 에서는 클래스의 기본 다형성 Abstract 추상 , Interface DataClass Object 에 대해서 다룰 것이다. 객체지향프로그래밍에서 interface와 abstract 를 이용한 다형성 프로그래밍이 중요하다. 2021.10.02 - [소프트웨어공학/디자인 패턴] - [디자인 패턴] 설계 원칙 [디자인 패턴] 설계 원칙 설계 원칙 기본 원칙들 Encapsulation, Abstraction Inheritance, Polymorphism Association/Aggregation/Composition 객체 : 상태와 행동으로 나타낸다. 객체지향 현실 세계의 개념(concepts or things)을.. javapp.tistory.com 디자인 패턴을 알.. 2021. 10. 18. Adapter 어댑터 패턴 - 구조, client 가 요구하는 인터페이스와 제공된 클래스의 인터페이스가 일치하지 않을 때 | Design Pattern 디자인 패턴 구조에 따른 패턴 분류 적용 범위 Scope 클래스 class - 클래스 간 관계 - 주로 inheritance 사용 - 정적) 컴파일 시 결정됨 Adapter (class) (상속) 객체 object - 객체 간 관계 - 주로 composition 사용 - 동적) 실행 시 변경 가능 Adapter (object) (구성) Facade (퍼사드) Composite Decorator Proxy Bridge Flyweight 인터페이스 관련 패턴 • Adapter pattern • Facade pattern • Composite pattern • Bridge pattern ※ 모두 구조 패턴에 속함 Adapter 구조 패턴 언제 ? -> Interface mismatching client 가 요구하는 인터페.. 2021. 10. 10. 이전 1 다음