Skip to content
میلاد حاتمی
میلاد حاتمی هستم. برنامه نویس و مدرس جنگو. امیدوارم بتونم با آموزش های رایگان در جنگولرن به برنامه نویس های این فریمورک کمک کنم.

حمایت از جنگولرن

تمامی مطالب و آموزش های جنگولرن رایگان است. برای حمایت از جنگولرن اینجا (پلتفرم کافیته) کلیک کنید.

09384677005 miladhzz@gmail.com instagram linkedin github-circle
جنگولرن - آموزش رایگان Django به زبان فارسی
خانه » 28 مورد best practice جهت مدل های جنگو
Post Views: 202

28 مورد best practice جهت مدل های جنگو

آوریل 14, 2023 آوریل 14, 2023 دسته‌بندی نشده
میلاد حاتمی

✅ 28 تا best practice توی کار با مدل های جنگو (عناوین مقاله رو اینجا گذاشتم)
برای دیدن جزییات لینک رو باز کنید.
1. Correct Model Naming
2. Relationship Field Naming
3. Correct Related-Name
4. Do not use ForeignKey with unique=True
5. Attributes and Methods Order in a Model
6. Adding a Model via Migration
7. Denormalisations
8. BooleanField
9. Business Logic in Models
10. Field Duplication in ModelForm
11. Do not use ObjectDoesNotExist
12. Use of choices
13. Why do you need an extra .all()?
14. Many flags in a model?
15. Redundant model name in a field name
16. Dirty data should not be found in a base
17. Getting the earliest/latest object
18. Never make len(queryset)
19. if queryset is a bad idea
20. Using help_text as documentation
21. Money Information Storage
22. Don’t use null=true if you don’t need it
23. Remove _id
24. Define unicode or str
25. Transparent fields list
26. Do not heap all files loaded by user in the same folder
27. Use abstract models
28. Use custom Manager and QuerySet
لینک:
https://steelkiwi.com/blog/best-practices-working-django-models-python/

Post Views: 202
کپی از مطالب حتی بدون ذکر منبع مجاز است.