? ????? ??? ? ??? ?? ? ??? ?? ?????. ??? ??? ?? ????? ????? ????? ?? ??? ???? ???? ???? ????? ?? ??? ??? ? ????. ??? ??? ? ??? Django REST Framework(DRF)? ???? ???? ?? ? ??? ??? ???? Djoser???. ? ?????? ??? ?? ? ??? ?? ??? ??? ??? ???? Djoser? ???? ?? ??? ?? ???? ???? ??? ???????.
???? ??
????? ????? ??? ??? ?????.
mkdir userauth
??? IDE?? ? ????? ???? ?? ??? ???? ??????
python venv .venv source .venv/bin/activate
???? ??? ???? ?????.
pip install django djangorestframework djoser djangorestframework_simplejwt social-auth-app-django drf-yasg
??: social-auth-app-django? ?? ?? ???? Djoser? ?? ???? ??? ? ????. ???? ????? ???? ?? ??? ? ????
??? ??? ????.txt ??? ???? ???? ?????.
pip freeze > requirements.txt
?? ???? ???? ????.txt ??? ??? ??? ?? ???? ????? ???.
Django ???? ?? ? ?? ??
django-admin startapp userauth .
??? ?? django ????? ?????. ?? ?? ???? ?? ?? ???? ???
python manage.py startapp accounts
?? ???? ?????? ??? ????? ???.
.venv(????)
??/(???)
userauth/(?? ???? ??)
manage.py
requirements.txt
???? ??
settings.py? INSTALLED_APPS ??? ?? ???? ?? ?????.
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Third Party Apps 'rest_framework', 'djoser', 'rest_framework_simplejwt', 'drf_yasg', # Local Apps 'accounts', ]
Django REST Framework ? SimpleJWT? ?? ??? ????? settings.py? ???????.
REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_simplejwt.authentication.JWTAuthentication', ), }
???? ??? ?? ??? ??? ??? ?????
?? ??? presents.py ??? ?????
account/managers.py
from django.contrib.auth.models import BaseUserManager class CustomUserManager(BaseUserManager): def create_user(self, email, username, password=None, **extra_fields) -> None: if not username: raise ValueError("Username is required") if not email: raise ValueError("Email is required") email = self.normalize_email(email) user = self.model(email=email, username=username, **extra_fields) user.set_password(password) user.save() return user def create_superuser(self, email, username, password, **extra_fields): """ Create and save a SuperUser with the given email and password. """ extra_fields.setdefault("is_staff", True) extra_fields.setdefault("is_superuser", True) extra_fields.setdefault("is_active", True) if extra_fields.get("is_staff") is not True: raise ValueError("Superuser must have is_staff=True.") if extra_fields.get("is_superuser") is not True: raise ValueError("Superuser must have is_superuser=True.") return self.create_user(email, username, password, **extra_fields)
accounts/models.py
from django.db import models from django.contrib.auth.models import AbstractUser from accounts.managers import CustomUserManager class CustomUser(AbstractUser): username = None email = models.EmailField(unique=True) is_verified = models.BooleanField(default=False) USERNAME_FIELD = 'email' REQUIRED_FIELDS = [] objects = CustomUserManager() def __str__(self): return self.email
settings.py ??? ?? ?? ?????
AUTH_USER_MODEL = 'accounts.CustomUser'
??????? ??? ?? ?? ?? ??? ??? ? ????
python manage.py makemigrations python manage.py migrate python manage.py runserver
????? ??? ?? ????.
Djoser URL ??
API ??? Swagger? ?? Djoser? ????? URL ??? ???? URL? ?????.
userauth/urls.py
from django.contrib import admin from django.urls import include, path from rest_framework import permissions from drf_yasg.views import get_schema_view from drf_yasg import openapi schema_view = get_schema_view( openapi.Info( title="User Accounts API", default_version="v1", description="REST implementation of Django authentication system using Djoser", contact=openapi.Contact(email="contact@snippets.local"), license=openapi.License(name="BSD License"), ), public=True, permission_classes=(permissions.AllowAny,), ) urlpatterns = [ path('admin/', admin.site.urls), path('api/docs', schema_view.with_ui("swagger", cache_timeout=0), name="swagger-ui"), path('api/', include('djoser.urls')), path('api/', include('djoser.urls.jwt')) ]
API ??? ??? ?????? http://127.0.0.1:8000/api/docs/? ?????.
Djoser ?? ??
djoser? ?? ??? ? ?? ?? ??? ???? ?? ? ????. Djoser ??
userauth/settings.py
mkdir userauth
??? ???? ??? ???? ??? ???. ??? URL? ???? ??? ? ??? ???? ???? ???? ?????. ??? uid? ???? ??? ??? ????? ??? ??? ?? ???? ??? ???
??? ?? ??
????? ??? ??? ???? ???. ??? ??? ?? mailtrap? ??? ?????. ???? ??? ??? ???? ???? ???? ??? ? ????.
??? ??? ???
python venv .venv source .venv/bin/activate
?? ?? ??? ????
pip install django djangorestframework djoser djangorestframework_simplejwt social-auth-app-django drf-yasg
?? ???? ??? ?? ???? ????
?? ????? ?? Postman? ???? ????????.
? ??? ???
??? ????? ??? ???? ?????
??? ??? ??? ??
??? ???? ?? ????? ?????
?? ????? ??? ??? ??? ?? ??? ??? ???? ??? ??? ??? ?????
??/???/???/activation_email.py
djoser? ?? ???? ?? ???? ??? ?????
pip freeze > requirements.txt
????? ??? ??? ?? ????? djoser ??? ?? ?? ?????
django-admin startapp userauth .
?? ??? ???? ??? ????.
??? ?? ??
? ?? ??? ????? ??? ?? ??? ???????.
account/views.py?? ??? ??? ??? ???? ??? ?????:
accounts/views.py
python manage.py startapp accounts
djoser? ??? ??? ???? ??? ???? ??? ??? is_verified ??? true? ?????
??/urls.py
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', # Third Party Apps 'rest_framework', 'djoser', 'rest_framework_simplejwt', 'drf_yasg', # Local Apps 'accounts', ]
???? ??? URL ??
userauth/urls.py
REST_FRAMEWORK = { 'DEFAULT_AUTHENTICATION_CLASSES': ( 'rest_framework_simplejwt.authentication.JWTAuthentication', ), }
?? ?????? ? ??? ???? ???? ???? ??? ??? URL? ?????.
?? ????? URL? ???? ?? ??? ? ???? ???? ???
URL?? uid? ??? ???? account/urls.py ??? ??? ??? ??? ??? ??? ????
?????? ? ??? ;
mkdir userauth
UID? MTY???
??? cil456-aaf8331efb885f0b4412f35ce544648c???
????? ???? ??? ?????? ?? ????
???? Djoser? ??? ??? ?? ?? ????? ????. ?? ??? ??? ? ??? ?? ??? ???? ?? ??? ?? ???? ????. ? ???? ? ?? ????? ???? Google, Facebook, GitHub? ?? ?? ???? ???? ???? ???? ? ??? ?? ?? ??? ?? ?????. ???? ?? ??????!
???? ??? ???? ???? ??? ?????.
? ??? Django, Djoser ? JWT? ??? ??? ??? ?? ??? ???: 1?? ?? ?????. ??? ??? PHP ??? ????? ?? ?? ??? ?????!

? AI ??

Undress AI Tool
??? ???? ??

Undresser.AI Undress
???? ?? ??? ??? ?? AI ?? ?

AI Clothes Remover
???? ?? ???? ??? AI ?????.

Clothoff.io
AI ? ???

Video Face Swap
??? ??? AI ?? ?? ??? ???? ?? ???? ??? ?? ????!

?? ??

??? ??

???++7.3.1
???? ?? ?? ?? ???

SublimeText3 ??? ??
??? ??, ???? ?? ????.

???? 13.0.1 ???
??? PHP ?? ?? ??

???? CS6
??? ? ?? ??

SublimeText3 Mac ??
? ??? ?? ?? ?????(SublimeText3)

??? ??











Python? Unittest ? Pytest? ??? ? ???? ??, ?? ? ??? ????? ? ?? ?? ???? ??? ??? ?????. 1. ??? ??? ?? ??? ???? ??? ??? ??? ?????. UnitTest? ??? ??? ???? ???? Test \ _? ???? ???? ?????. Pytest? ? ?????. Test \ _?? ???? ?? ? ??????. 2. ??? ?? ?? ? ?? ? ??? ??? ????. UnitTest? Assertequal, AssertTrue ? ?? ??? ???? ?? Pytest? ??? Assert ?? ???? ?? ?? ??? ???? ?????. 3. ?? ??? ?? ? ?? ????? ????? ????.

pythonisidealfordataanalysisduetonumpyandpandas.1) numpyexcelsatnumericalcomputationsfast, multi-dimensionalArraysandectorizedOferationsLikenp.sqrt ()

?? ????? (DP)? ??? ??? ? ??? ?? ??? ??? ??? ? ??? ??? ?? ??? ???? ??? ????? ??????. ? ?? ?? ??? ????. 1. ??? (??) : ??? ?? ??? ???? ??? ???? ?? ??? ??????. 2. ??? (?) : ?? ???? ???? ????? ?????. ???? ???, ?? ?? ?? ?? ??/?? ?, ??? ??? ?? ?? ?? ??? ??? ????? ?????. ?????? ????? ?? ???? ?? ??? ? ???, ?? ??? ???? ?? ?? ??? ???? ??? ???? ????? ???? ???????.

??? ?? ???? ????? ????? __iter_ ? __next__ ???? ???????. ① __iter__ ???? ??? ? ?? ??? ???? ??? ?? ?? ??? ?????. ② __next__ ???? ? ??? ?? ????, ?? ??? ??? ????, ? ?? ??? ??? stopiteration ??? ??????. status ??? ???? ??????? ?? ??? ??? ?? ?? ??? ???????. pile ?? ?? ???? ?? ??? ?? ? ??? ?? ? ??? ?????? ?????. simple ??? ??? ?? ?? ??? ?? ???? ???? ?? ??? ? ??? ?? ????? ???? ??? ??? ???????.

Python? ?? ???? ?? ???, ?? ?? ????, ?? ???? ?? ? AI/ML ??? ???? ??? ?????. ??, Cpython? ???? ????? ?? ??, ?? ?? ??? ? ?? ? ?? ??? ?? ??? ??????. ??, ??? ????? ?? ?? ? ?? ??? ????? ?? ?? ? ? ??? ?? ?????. ??, Pyscript ? Nuitka? ?? ?? ???? ??? ??? ?? ??? ?????. ?????, AI ? ??? ?? ??? ?? ???? ??? ?? ???????? ???? ?? ? ??? ?????. ??? ??? Python? ??? ??? ????? ???? ?? ??? ???? ??? ?????.

Python? ?? ??? ???? ?????? ????, ????? ? ?? ??????? ???? ? ??? ??? ???? ?? ??? ?????. ?? TCP ??? ????? Socket.Socket ()? ???? ??? ??? ?? ? ??? ????? .listen ()? ???? ??? ?? .accept ()? ?? ????? ??? ???????. TCP ?????? ????? ?? ??? ??? ??? ????? .connect ()? ?? ? ?? .sendall ()? ???? ???? ??? .recv ()? ?? ??? ??????. ?? ?????? ????? 1. ??? : ??? ??? ? ???? ??? ? ????. 2. ??? I/O : ?? ??, Asyncio ?????? ? ??? ??? ?? ? ? ????. ???? ? ?

Python List ????? ?? ?? ??? [Start : End : Step] ??? ????? ??? ???? ????. 1. ?? ????? ?? ??? ?? [start : end : step]???. ??? ?? ??? (??), ?? ? ??? (???? ??)?? ??? ?? ?????. 2. ????? ???? 0?? ????? ???? ????? ??? ??? ???? ????? ??? 1? ??????. 3. my_list [: n]? ???? ? ?? n ??? ?? my_list [-n :]? ???? ??? n ??? ????. 4. My_List [:: 2]? ?? ??? ?? ?? ??? ???? ??? ??? ?? ?? ?? ??? ???? ? ????. 5. ???? ???? ? ???? ???? ????

???? Python ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????
