Hi Jim,

I would really recommend looking at https://ccbv.co.uk/projects/Django/1.9/

There are diagrams to show the hierarchy of inheritance and mixins, plus
all the properties and methods are there to see and explore.

The place to start is the dispatch method, as_view is called first but you
can backtrack to that later. Have a look, you'll see dispatch gets the
request's method tries to call a method with that name if it is a valid
HTTP method and returns a HTTP 405 if either the method is not defined.

Dan



On Thursday, 1 December 2016, jim_anderson <jim_ander...@jjajava.com> wrote:

> Hi,
>
> A few intro words first. I am an experienced programmer and worked on a
> few python projects for maybe 3 years around 2000. Most of my other
> programming has been in c, c++, and java - maybe too many years. My current
> project is a web based project using Python 3.5.2 and Django 1.9.7. I have
> gotten to the point where I'm feeling pretty comfortable with python again,
> but I'm still getting a handle on django, so I'll classify myself as being
> intermediate in my python knowledge and mid-novice with django. I am
> writing a bit of code for the project and in parallel, I am experimenting
> with a django project that I call 'testDjangoProject' (I'm not too
> original). My current objective in the test project is to get a working
> template environment and a working knowledge so that I can write and
> templates, template tags and template filters.
>
> I have a few questions, but I'm going enter each question as a separate
> thread in this group.
>
> So, question number 1:
>
> I have created a view class that is derived from generic.ListView, which
> inherits from a few other classes both directly and indirectly. My class,
> called TagView, overrides 2 methods get_query_set() and get(). I basically
> did this to mimic what I saw in some tutorials. When I run my test case,
> the get() method is called. There are a number of other derived methods
> that could also have been overriden. What are the deciding factors that
> django uses to determine which view class method to call?
>
> BTW, my 'tag' model has 2 entries in a sqlite3 db.
>
> Jim Anderson
>
> --
> 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 post to this group, send email to django-users@googlegroups.com.
> Visit this group at https://groups.google.com/group/django-users.
> To view this discussion on the web visit https://groups.google.com/d/ms
> gid/django-users/ce1e5ebf-725f-4c44-8a91-2e742061c764%40googlegroups.com
> <https://groups.google.com/d/msgid/django-users/ce1e5ebf-725f-4c44-8a91-2e742061c764%40googlegroups.com?utm_medium=email&utm_source=footer>
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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 post to this group, send email to django-users@googlegroups.com.
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/CAPZHCY4LBOy5JeOts1nphScOgnBj%2B1HG%3DShUZF6CPCqwt1A0jw%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to