پیشنهاد فرادرس

آموزش View کلاس محور در جنگو

دسته بندی ها: آموزش جنگو (Django) ، آموزش های TreeHouse ، آموزش پایتون (Python)

توابع Django view ساده و آسان برای استفاده هستند، اما گاهی اوقات کارهای تکراری زیادی را مجددا تکرار می کنید. خوشبختانه، جنگو یک راه برای ایجاد View به عنوان کلاس ارائه می دهد که می تواند منجر به کد های تمیزتر و قابل استفاده مجدد شود. در این دوره با View کلاس محور آشنا شوید.

سرفصل:

  • View کلاس محور چیست؟
  • View Class
  • مبانی View
  • TemplateView
  • ListView و DetailView
  • فهرست و جزئیات
  • CRUD Views
  • سفارش سازی View کلاس محور
  • متدهای Overriding
  • Override get_queryset
  • Franken-Views
  • ترکیب DetailView و DeleteView
  • Mixins
  • LoginRequiredMixin
  • مخلوط سفارشی
  • View کلاس محور در جنگو
آیا این نوشته را دوست داشتید؟
Django Class-based Views Course Publisher:TeamTreeHouse Author:Kenneth Love Level:Intermediate

Django view functions are simple and easy to use but sometimes you find yourself repeating a lot of the same work over and over. Luckily, Django also offers a way to create views as classes which can lead to cleaner, more reusable code. Class-based views have a lot of nooks and crannies, though, so let us show you around this powerful tool!
About this Course
Django view functions are simple and easy to use but sometimes you find yourself repeating a lot of the same work over and over. Luckily, Django also offers a way to create views as classes which can lead to cleaner, more reusable code. Class-based views have a lot of nooks and crannies, though, so let us show you around this powerful tool!
What you'll learn
Class-based views
Generic views
MixinsClassy Views
Django class-based views are a great way to avoid repeating yourself. They provide a shortcut to common functionality but they're not the easiest thing to wrap your head around. Let me help you get a grip on this Django feature.
9 steps
What are Class-based Views?
2:22
The View Class
7:27
Basic View
3 objectives
TemplateView
6:48
TemplateView
3 objectives
ListView and DetailView
6:48
List and Detail
3 objectives
CRUD Views
14:41
CRUDs
3 objectives
Customizing Class-based Views
Class-based views wouldn't be nearly as useful if you couldn't tweak them to meet your needs. I'll show you how to combine view classes, use Django's provided mixins, and more to get just the view you need.
9 steps
Overriding Methods
8:01
Override get_queryset
1 objective
Franken-Views
6:30
Combine DetailView and DeleteView
3 objectives
Mixins
13:09
LoginRequiredMixin
2 objectives
Custom Mixin
4 objectives
Wrap Up
0:51
Review: Django Class-based Views
6 questions

پیشنهاد فرادرس

لینک های دانلود حجم فایل: 224.0MB TeamTreeHouse Django Class-based Views Course_git.ir.rar