Skip to content

برگه‌ها

  • درباره من

تماس با من

برای ارتباط با بنده ایمیل های خود را به آدرس :
miladhzz@gmail.com
ارسال کنید
و یا به شماره 09384677005 پیامک ارسال کنید.

سایت میلاد حاتمی
  • پروژه ها
  • آموزش
  • برنامه نویسی
  • نرم افزار
  • درباره من
خانه » 28 مورد best practice جهت مدل های جنگو

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

Post Views: 174
Leave a comment on 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: 174

Add a Comment لغو پاسخ

نشانی ایمیل شما منتشر نخواهد شد. بخش‌های موردنیاز علامت‌گذاری شده‌اند *

Time limit is exhausted. Please reload CAPTCHA.

© 2026 - All rights reserved