Django? ??? ??? ??? ??? ?? ?? ???? ??? ???? ?? ? ?????. ? ?????? ???? Django ????? ???? Django ??? ??? ???? ??? ?????. ?? ??? ?? ????? ????, Django? ????, ??? ?? ??? ?????.
1??: ?? ?? ??
????? ?? ????? ?? ??? ??? ?????. ???? ?? ?????.
$ python3 -m venv env
???? ?? ??? ??????.
- Windows? ??:
env\Scripts\activate
- macOS/Linux? ??:
source env/bin/activate
2??: Django ??
?? ??? ???? ???? ??? ???? Django? ?????.
pip install django
3??: Django ???? ??
?? ??? ???? Django? ??? ?, ??? Django ????? ?????:
$ django-admin startproject mysite $ cd mysite
??? ?? ??? ?? ???? ??? ?????.
mysite/ manage.py mysite/ __init__.py settings.py urls.py asgi.py wsgi.py
4??: ? ?? ? ??
???? Django ?????? ? ?? ????. ? ??? ??? ??? ????.
$ python3 manage.py startapp core
?? ????? ????? mysite/settings.py? INSTALLED_APPS ??? ?????.
INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'core', # Add this line ]
5??: ?? ??
?? ? ??? models.py? ?? ?? Post ? Comment ??? ?????.
from django.db import models class Post(models.Model): title = models.CharField(max_length=200) content = models.TextField() created_at = models.DateTimeField(auto_now_add=True) updated_at = models.DateTimeField(auto_now=True) def __str__(self): return self.title class Comment(models.Model): post = models.ForeignKey(Post, related_name='comments', on_delete=models.CASCADE) author = models.CharField(max_length=100) content = models.TextField() created_at = models.DateTimeField(auto_now_add=True) def __str__(self): return f'Comment by {self.author} on {self.post}'
6??: ?????? ??
??? ??? ? ?? ??? ???? ??????? ??????? ???? ?????.
$ python3 manage.py makemigrations $ python3 manage.py migrate
*7??: ??? ??? ?? ??
*
?? ??? ??????? Django ??? ??? ??? ?????. core/admin.py? ?? ?? ??? ?????:
from django.contrib import admin from .models import Post, Comment class CommentInline(admin.TabularInline): model = Comment extra = 1 # Allows one extra empty comment form class PostAdmin(admin.ModelAdmin): list_display = ('title', 'created_at', 'updated_at') search_fields = ('title',) # Adds a search bar for the title field prepopulated_fields = {'slug': ('title',)} # Automatically fills in the slug field admin.site.register(Post, PostAdmin) admin.site.register(Comment)
8??: ???? ??
??? ??? ?????? ????? ???? ???. ?? ??? ?????:
$ python3 manage.py createsuperuser
??? ??, ???, ????? ????? ???? ?????. ??? ?? ??? ?????:
Username: admin Email address: admin@gmail.com Password: ********** Password (again): *********
9??: ?? ?? ??
?? ?? ???? ?? ??? ?????.
$ python3 manage.py runserver
10??: Django ??? ?? ??
?? ????? ?? ??? URL: http://127.0.0.1:8000/admin/?? ?????. Django ??? ??? ??? ?????:
??? ???? ?? ??? ???? ????? ??? ??? ?????.
???? ??? ????, ??? ? ?? ??? ??, Django? ?? ?????? ???? ??? ??? ??? ? ????.
??
Django? ??? ??? ???? ???? ?? ?????? ??? ?? ?? ?? ??? ???? ?? ??? ? ????. ? ?? ??, ?? ??, ?? ? ??? ?? ??? ??? ???? ?? ??? ?????.
??? ??? Django ?? ??? ?????.
https://docs.djangoproject.com/en/5.1/ref/contrib/admin/
? ??? Django? ?? ? ?? ? ??? ?? ?????. ??? ??? 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 ?? ?? ?????? ?? ????, "??? ?????, ?? ??"? ???? ??? ??? ??? ?? ??? ?????. 1. ???? ?? ? ??? ?? ?????. ?? ???? ?? ??? ???? ??? ? ? ????. ?? ??, Spoke () ?? ???? ??? ??? ?? ??? ?? ????? ?? ??? ??? ????. 2. ???? ?? ???? ??? ??? ?????? Draw () ???? ???? ????? ?? ???? ?? ??? ???? ??? ???? ?? ?? ?? ??? ????? ?? ?? ????? ?? ?????. 3. Python ?? ???? ???????. ?? ???? ??? ???? ?? ???? ??? ????? ??? ?? ???? ??? ???? ????. ??? ??? ??? ???? ? ??? "?? ??"??????. 4. ???? ? ???? ?? ??? ?????

???? __iter __ () ? __next __ () ???? ???? ?????. ???? ??? ? ??? ????, ?? ???? ?? ??? ??? ???? ?????. 1. ???? ?? () ?? ? ??? ??? ???? ? ?? ??? ?? ? ?? ???? ??? ????. 2. ???? ?? ??? ???? ??? ???? ???? ???? ???? ?? ???? ?????. 3. ???? ???? ?? ??? ?? ? ? ? ??? ?? ? ???????? ? ? ??? ?? ??? ??? ???? ?? ? ? ???? ??????. ?? : ??? ?? ???? ??? ???? ????. ???? ?? ?? ? ??? ?????? ???? ? ?? ?? ? ? ????.

API ??? ??? ??? ?? ??? ???? ???? ???? ????. 1. Apikey? ?? ??? ?? ????, ????? ?? ?? ?? URL ?? ??? ?????. 2. Basicauth? ?? ???? ??? Base64 ??? ??? ??? ??? ????? ?????. 3. OAUTH2? ?? Client_ID ? Client_Secret? ?? ??? ?? ?? ?? ??? BearEtroken? ???????. 4. ?? ??? ???? ?? ?? ?? ???? ????? ???? ?? ?? ? ????. ???, ??? ?? ??? ??? ???? ?? ??? ???? ???? ?? ?????.

????? ??? ? ??? ??? ?? ??? ???? ??? zip () ??? ???? ????.? ??? ?? ??? ???? ?? ??? ?? ????. ?? ??? ???? ?? ?? itertools.zip_longest ()? ???? ?? ?? ? ??? ?? ? ????. enumerate ()? ???? ??? ???? ?? ? ????. 1.zip ()? ???? ????? ?? ??? ??? ??? ?????. 2.zip_longest ()? ???? ?? ??? ?? ? ? ???? ?? ? ????. 3. Enumental (Zip ())? ??? ??? ????? ??? ???? ???? ?? ???? ?? ? ????.

typehintsinpythonsolvetheproblemombiguityandpotentialbugsindynamicallytypedcodebyallowingdevelopscifyexpectiontypes. theyenhancereadability, enablearylybugdetection ? improvetoomingsupport.typehintsareaddedusingaColon (:) forvariblesAndAramete

inpython, iteratorsareobjectsthatlowloppingthroughcollections __ () ? __next __ ()

Assert? ????? ???? ???? ?? ? ???? ??? ???? ??? ?? ?? ????. ??? ??? ??? ?? ??? ?????, ?? ?? ?? ??, ?? ?? ?? ?? ?? ?? ??? ????? ?? ?? ??? ?? ???? ??? ? ??? ??? ??? ??? ?? ???????. ?? ??? ???? ?? ?? ???? ?? ????? ??? ? ????.

Python? ???? ????? ???? API? ???? Fastapi? ?????. ?? ??? ?? ????? ?????? ??? ??? ??? ???? ?? ? ? ????. Fastapi ? Asgi Server Uvicorn? ?? ? ? ????? ??? ??? ? ????. ??? ??, ?? ?? ?? ? ???? ?????? API? ???? ?? ? ? ????. Fastapi? ??? HTTP ??? ???? ?? ?? ? Swaggerui ? Redoc Documentation Systems? ?????. ?? ??? ?? URL ?? ??? ?? ? ??? ??, ?? ?? ??? ???? ???? ?? ?? ??? ??? ? ????. Pydantic ??? ???? ??? ?? ???? ???? ????? ? ??? ? ? ????.
