분류 전체보기408 Getting Started with Django Django overview Django Home : https://www.djangoproject.com/ Django uses the MVT (Model-View-Template) pattern, which is slightly similar to MVC (Model-View-Controller) pattern. The MVT pattern consists of three main components: Model – defines the data or contains the logic that interacts with the data in the database. View – communicates with the database via model and transfers data to the te.. 2023. 4. 8. Django Create App Django projects and applications In the Django framework: A project is a Django installation with some settings. An application is a group of models, views, templates, and URLs. Django 프로젝트에는 하나 이상의 응용 프로그램이 있을 수 있습니다. 예를 들어 프로젝트는 블로그, 사용자 및 위키와 같은 여러 응용 프로그램으로 구성될 수 있는 웹 사이트와 같습니다. 일반적으로 다른 Django 프로젝트에서 재사용할 수 있는 Django 애플리케이션을 디자인합니다. 다음 그림은 Django 프로젝트의 구조와 응용 프로그램을 보여줍니다. Creating a blog ap.. 2023. 4. 8. [ Concurrency ] Index MULTITHREADING Threads vs. Processes Threading Module Multithreading Example Threading Event Stop a Thread Daemon Threads Thread-safe Queue Thread Pools Threading Locks MULTIPROCESSING Multiprocessing Module Process Pools – ProcessPoolExecutor ASYNCIO Python Event Loop Async/Await Creating Tasks Cancelling Tasks Cancelling Tasks – asyncio.wait_for() Future Running Multiple Tasks Concurrently 2023. 4. 8. [ DJANGO ] Index DJANGO BASICS Getting Started with Django Creating a Django App Defining Models Making Migrations Creating Flash Messages Using Django Admin Understanding Django Form Creating Templates Defining Edit Form Creating Delete Form Building Login/Logout Forms Building User Registration Form DJANGO CLASS-BASED VIEWS Django Todo App Displaying a List using Django ListView Displaying a Model Detail using.. 2023. 4. 8. [ Python Advance ] Index VARIABLES & MEMORY MANAGEMENT References Garbage Collection Dynamic Typing Mutable and Immutable Python is operator Python None NUMERIC TYPES Integers Floor Division Modulo Boolean AND Operator OR Operator Float Converting Float to Int Rounding Decimal VARIABLE SCOPES Variable Scopes nonlocal CLOSURES Python Closures DECORATORS Python Decorators Python Decorator with Arguments Python Class Decor.. 2023. 4. 8. Custom Exceptions https://www.pythontutorial.net/python-oop/python-custom-exception/ Introduction to the Python custom exception To create a custom exception class, you define a class that inherits from the built-in Exception class or one of its subclasses such as ValueError class: The following example defines a CustomException class that inherits from the Exception class: class CustomException(Exception): """ m.. 2023. 4. 7. Raise From https://www.pythontutorial.net/python-oop/python-raise-from/ Introduction to the Python raise from statement The raise from statement has the following syntax: raise from Technically, it’s equivalent to the following: ex = ExceptionType ex.__cause__ = cause raise ex By default, the __cause__ attribute on exception objects is always initialized to None. Python raise from statement example The fol.. 2023. 4. 7. Raise Exceptions https://www.pythontutorial.net/python-oop/python-raise-exception/ Introduction to the Python raise statement To raise an exception, you use the raise statement: raise ExceptionType() The ExceptionType() must be subclass of the BaseException class. Typically, it is a subclass of the Exception class. Note that the ExceptionType doesn’t need to be directly inherited from the Exception class. It can.. 2023. 4. 7. Exception Handling https://www.pythontutorial.net/python-oop/python-exception-handling/ Introduction to the exception handling in Python To handle exceptions, you use the try statement. The try statement has the following clauses: try: # code that you want to protect from exceptions except as ex: # code that handle the exception finally: # code that always execute whether the exception occurred or not else: # code.. 2023. 4. 7. 이전 1 ··· 15 16 17 18 19 20 21 ··· 46 다음