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
-- 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+unsubscribe@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/ce1e5ebf-725f-4c44-8a91-2e742061c764%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
No comments:
Post a Comment