Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Robert F.
Thank you to everyone who took time to answer my question!  I will check 
out the resources you mentioned.

On Tuesday, January 12, 2021 at 7:21:33 AM UTC-8 David Nugent wrote:

> Robert,
>
> I think the ultimate resource you can use on this beyond the documentation 
> is the django source code itself.
>
> It may look confusing at first, but if you check out the class hierarchy 
> from the starting points in the docs, how classes are related and mix-ins 
> are used, you gain a lot of insight you don't and can't get from the docs. 
>  With that understanding you are able to author with your own CBVs derived 
> from the bits provided by Django to create a great deal of customisation 
> for you applications where the stock ones may not fit.
>
> There is no better teacher than trying things yourself, working out what 
> went wrong when it does not work.
>
> But I'll provide a nutshell version:
>
> Essentially a CBV is a class that provides functionality around 
> dispatching a web request. At the core is the 
> dispatch() method, which passes the request onto specific method handlers. 
>  Anything else beyond that supports more specific use cases that usually 
> simplifies handling the request - i.e. templates - and each of those 
> provides its own set of patterns.
>
> HTH, 
> /d
>
>
> On 12 January 2021 at 02:15:11, Robert F. (robert@gmail.com) wrote:
>
> Are there any Django libraries that make extensive use of class-based 
> views that I might study if I want to gain an in-depth understanding of how 
> to use them? The Django documentation is OK at explaining what they are and 
> how they work but most of the examples are very trivial in nature. I'd like 
> to become a "power user" and for that I need lots of code to study. I've 
> looked at the Classy Class-Based Views  examples but 
> they seem too "meta" to me to shed any real light on how to use them in 
> practice. Thanks.
>
> -- 
>
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users...@googlegroups.com.
>
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/eda0feed-fb61-4882-bbc3-14531b13526fn%40googlegroups.com
>  
> 
> .
>
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/41a1019d-3da5-40cc-9abe-5b69d77cc542n%40googlegroups.com.


Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread David Nugent
Robert,

I think the ultimate resource you can use on this beyond the documentation is 
the django source code itself.

It may look confusing at first, but if you check out the class hierarchy from 
the starting points in the docs, how classes are related and mix-ins are used, 
you gain a lot of insight you don't and can't get from the docs.  With that 
understanding you are able to author with your own CBVs derived from the bits 
provided by Django to create a great deal of customisation for you applications 
where the stock ones may not fit.

There is no better teacher than trying things yourself, working out what went 
wrong when it does not work.

But I'll provide a nutshell version:

Essentially a CBV is a class that provides functionality around dispatching a 
web request. At the core is the
dispatch() method, which passes the request onto specific method handlers.  
Anything else beyond that supports more specific use cases that usually 
simplifies handling the request - i.e. templates - and each of those provides 
its own set of patterns.

HTH,
/d


On 12 January 2021 at 02:15:11, Robert F. 
(robert.flaug...@gmail.com) wrote:

Are there any Django libraries that make extensive use of class-based views 
that I might study if I want to gain an in-depth understanding of how to use 
them? The Django documentation is OK at explaining what they are and how they 
work but most of the examples are very trivial in nature. I'd like to become a 
"power user" and for that I need lots of code to study. I've looked at the 
Classy Class-Based Views examples but they seem too "meta" 
to me to shed any real light on how to use them in practice. Thanks.

--
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eda0feed-fb61-4882-bbc3-14531b13526fn%40googlegroups.com.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/etPan.5ffdbe50.37df5d44.1d8d%40uniquode.io.


Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Benjamin Schollnick
> I recommend you consider 
> https://spookylukey.github.io/django-views-the-right-way/

I second this, I’m going through this right now, and it’s very useful 
information regarding Class Based views vs Function Based views…

It’s making me consider rewriting Quickbbs/Gallery again, with a less kludgy 
approach.

- Benjamin



> On Jan 12, 2021, at 3:48 AM, Carsten Fuchs  wrote:
> 
> Dear Robert,
> 
> I recommend you consider 
> https://spookylukey.github.io/django-views-the-right-way/
> 
> Best regards,
> Carsten
> 
> 
> Am 11.01.21 um 16:14 schrieb Robert F.:
>> Are there any Django libraries that make extensive use of class-based views 
>> that I might study if I want to gain an in-depth understanding of how to use 
>> them? The Django documentation is OK at explaining what they are and how 
>> they work but most of the examples are very trivial in nature. I'd like to 
>> become a "power user" and for that I need lots of code to study. I've looked 
>> at the Classy Class-Based Views  examples but they seem 
>> too "meta" to me to shed any real light on how to use them in practice. 
>> Thanks.
> 
> -- 
> You received this message because you are subscribed to the Google Groups 
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an 
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit 
> https://groups.google.com/d/msgid/django-users/c3105eb8-7adf-8e95-e3d6-8908525eb3cb%40cafu.de.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/1FDD7267-EEB3-4780-A06F-22673860709B%40schollnick.net.


Re: Good Django libraries to read to really understand class-based views?

2021-01-12 Thread Carsten Fuchs
Dear Robert,

I recommend you consider 
https://spookylukey.github.io/django-views-the-right-way/

Best regards,
Carsten


Am 11.01.21 um 16:14 schrieb Robert F.:
> Are there any Django libraries that make extensive use of class-based views 
> that I might study if I want to gain an in-depth understanding of how to use 
> them? The Django documentation is OK at explaining what they are and how they 
> work but most of the examples are very trivial in nature. I'd like to become 
> a "power user" and for that I need lots of code to study. I've looked at the 
> Classy Class-Based Views  examples but they seem too 
> "meta" to me to shed any real light on how to use them in practice. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/c3105eb8-7adf-8e95-e3d6-8908525eb3cb%40cafu.de.


Re: Good Django libraries to read to really understand class-based views?

2021-01-11 Thread Arisophy
Hello Robert.

Did you read class based views code?
Original django class-based view code is below.

https://github.com/django/django/tree/master/django/views/generic


I made an extension class for FormView and ListView.

https://github.com/Arisophy/django-searchview

I hope it helps you understand how to extend the call-based view .

best regards.

Arisophy

2021年1月12日(火) 0:15 Robert F. :

> Are there any Django libraries that make extensive use of class-based
> views that I might study if I want to gain an in-depth understanding of how
> to use them? The Django documentation is OK at explaining what they are and
> how they work but most of the examples are very trivial in nature. I'd like
> to become a "power user" and for that I need lots of code to study. I've
> looked at the Classy Class-Based Views  examples but
> they seem too "meta" to me to shed any real light on how to use them in
> practice. Thanks.
>
> --
> You received this message because you are subscribed to the Google Groups
> "Django users" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to django-users+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/django-users/eda0feed-fb61-4882-bbc3-14531b13526fn%40googlegroups.com
> 
> .
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CA%2B2LtkDUkWaTAX2RXj09AgNxAknW%3Dz%2BG-SYmRj_B2zEGJf%2B4bQ%40mail.gmail.com.


Good Django libraries to read to really understand class-based views?

2021-01-11 Thread Robert F.
Are there any Django libraries that make extensive use of class-based views 
that I might study if I want to gain an in-depth understanding of how to 
use them? The Django documentation is OK at explaining what they are and 
how they work but most of the examples are very trivial in nature. I'd like 
to become a "power user" and for that I need lots of code to study. I've 
looked at the Classy Class-Based Views  examples but 
they seem too "meta" to me to shed any real light on how to use them in 
practice. Thanks.

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to django-users+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/eda0feed-fb61-4882-bbc3-14531b13526fn%40googlegroups.com.