Tag archive for "query"

Django query on model instance's class

I have an abstract base class that is used by various other models. The problem is that I need the same method that runs a query on all instances of those models, and that the manager isn't accessible via model instances. This is the code I ended up using. more

Add custom post types to the WordPress query

Run the filter whenever you want your post type in the main loop. Add is_home(), is_category() etc. Example is for the post type 'paste'. more