python - Can you access a subbed-classed model from within the super-class model in the Django ORM? -


Say that I inherited the model's legacy as defined below.

ArticleBase (Models.Model): title = models.CharField () Author = models.CharField () Category Review: Rating = models.IntegerField () Class News (ArticleBase) : Source = models.CharField ()

If I need a list of all the articles, even if (in this case the order has been ordered in both the review and the news), I ArticleBase Once I can run a query, I have a paragraph base record to determine whether it asks both questions of a model. Received related to a review or news records, foreign keys which have recorded?

I am assuming that all paragraph examples are examples of article subsection subclasses.

A solution is to collect subclass names in ArticleBase and some methods that return the subclass or subclass objects based on that information. Since multi-table succession defines an asset at the original frequency to reach a child's example, it is all very straight forward. Paragraph Base (models.Model) from the category of Django.db import models: = Models.CharField () Author = models.CharField () # Store the name of the actual class. Class_name = models.CharField () # Define that the class_name is set to ensure it is saved. Def Save (self, * args, ** quorz): self.class_name = self .__ class______________ super (paragraph, self). Savings (* Args, ** kwargs) # Multi-table succession defines a specialty to bring the child to the # short case Sub-class named Def get_child (self): Return getattr (self, self. Class_name.lower ()) #If actually you really need the class. Def get_child_class (self): back self .get_child () .__ class__ # Check the type against a subclass name or subclass # For example, 'if the article Child_IS (News): '# or' if article. Child_is ("news"): '. Def child_is (self, cls): ifinstance (cls, bassstring): return cls.lower () == self.class_name.lower () Other: return self.get_child_class () == CLS class review (ArticleBase): Rating = Models.IntegerField () Class News: Article source = models.CharField () </code> </pre> <p> This is not the only way to go about this. This, however, is a very simple and straight forward solution. Excellent stuff content type applications and generic modules that take advantage of it, they offer a variety of ways to do this, well, normally. </p> <p> This article can be useful for the following in Base: </p> <pre> <code> def __unicode __ (self) returns self.get_child () .__ Unicode __ () </code> </pre> <p> In that case, be aware that the failure to define <code> __unicode __ </code> in sub-codes, or on an event of ArticleBase (one that has not been subclassed) <code > __Unicode __ </code> calling will lead to an infinite recursion, thus following advice, discretion check (for example, directly in this way the RTIs An immediate stop) </p> <p> <strong> Disclaimer: </strong> </p> <p> This code is unwanted, I 'm convinced that there is a typo or two in it, but the original concept should be sound. There should be some flawed check in the production level code so that usage errors can be stopped. </p> </div> </html> <br /> <script data-cfasync='false' type='text/javascript' src='//p257699.clksite.com/adServe/banners?tid=257699_495604_10&type=footer&size=37'></script> <script data-cfasync='false' type='text/javascript' src='//p257699.clksite.com/adServe/banners?tid=257699_495604_11&tagid=9'></script> <script type="text/javascript" src="//ylx-1.com/slider.php?section=General&pub=435796&ga=g&side=random"></script> </div> <div class='post-bottom'> <div class='post-footer float-container'> <div class='post-footer-line post-footer-line-1'> </div> <div class='post-footer-line post-footer-line-2'> </div> <div class='post-footer-line post-footer-line-3'> </div> </div> <div class='post-share-buttons post-share-buttons-bottom invisible'> <div class='byline post-share-buttons goog-inline-block'> <div aria-owns='sharing-popup-Blog1-byline-873305248728006787' class='sharing' data-title='python - Can you access a subbed-classed model from within the super-class model in the Django ORM? -'> <button aria-controls='sharing-popup-Blog1-byline-873305248728006787' aria-label='Share' class='sharing-button touch-icon-button' id='sharing-button-Blog1-byline-873305248728006787' role='button'> <div class='flat-icon-button ripple'> <svg class='svg-icon-24'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_share_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </div> </button> <div class='share-buttons-container'> <ul aria-hidden='true' aria-label='Share' class='share-buttons hidden' id='sharing-popup-Blog1-byline-873305248728006787' role='menu'> <li> <span aria-label='Get link' class='sharing-platform-button sharing-element-link' data-href='https://www.blogger.com/share-post.g?blogID=953894213271141587&postID=873305248728006787&target=' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Get link'> <svg class='svg-icon-24 touch-icon sharing-link'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_link_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Get link</span> </span> </li> <li> <span aria-label='Share to Facebook' class='sharing-platform-button sharing-element-facebook' data-href='https://www.blogger.com/share-post.g?blogID=953894213271141587&postID=873305248728006787&target=facebook' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Share to Facebook'> <svg class='svg-icon-24 touch-icon sharing-facebook'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_facebook_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Facebook</span> </span> </li> <li> <span aria-label='Share to X' class='sharing-platform-button sharing-element-twitter' data-href='https://www.blogger.com/share-post.g?blogID=953894213271141587&postID=873305248728006787&target=twitter' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Share to X'> <svg class='svg-icon-24 touch-icon sharing-twitter'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_twitter_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>X</span> </span> </li> <li> <span aria-label='Share to Pinterest' class='sharing-platform-button sharing-element-pinterest' data-href='https://www.blogger.com/share-post.g?blogID=953894213271141587&postID=873305248728006787&target=pinterest' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Share to Pinterest'> <svg class='svg-icon-24 touch-icon sharing-pinterest'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_pinterest_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Pinterest</span> </span> </li> <li> <span aria-label='Email' class='sharing-platform-button sharing-element-email' data-href='https://www.blogger.com/share-post.g?blogID=953894213271141587&postID=873305248728006787&target=email' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Email'> <svg class='svg-icon-24 touch-icon sharing-email'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_24_email_dark' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Email</span> </span> </li> <li aria-hidden='true' class='hidden'> <span aria-label='Share to other apps' class='sharing-platform-button sharing-element-other' data-url='https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html' role='menuitem' tabindex='-1' title='Share to other apps'> <svg class='svg-icon-24 touch-icon sharing-sharingOther'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_more_horiz_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <span class='platform-sharing-text'>Other Apps</span> </span> </li> </ul> </div> </div> </div> </div> </div> </div> </div> <section class='comments embed' data-num-comments='0' id='comments'> <a name='comments'></a> <h3 class='title'>Comments</h3> <div id='Blog1_comments-block-wrapper'> </div> <div class='footer'> <div class='comment-form'> <a name='comment-form'></a> <h4 id='comment-post-message'>Post a Comment</h4> <a href='https://www.blogger.com/comment/frame/953894213271141587?po=873305248728006787&hl=en-GB&saa=85391&origin=https://dos2unixcode11.blogspot.com&skin=contempo' id='comment-editor-src'></a> <iframe allowtransparency='allowtransparency' class='blogger-iframe-colorize blogger-comment-from-post' frameborder='0' height='410px' id='comment-editor' name='comment-editor' src='' width='100%'></iframe> <script src='https://www.blogger.com/static/v1/jsbin/3790099508-comment_from_post_iframe.js' type='text/javascript'></script> <script type='text/javascript'> BLOG_CMT_createIframe('https://www.blogger.com/rpc_relay.html'); </script> </div> </div> </section> </article> </div> <style> .post-body a.b-tooltip-container { position: relative; display: inline-block; } .post-body a.b-tooltip-container .b-tooltip { display: block !important; position: absolute; top: 100%; left: 50%; transform: translate(-20%, 1px); visibility: hidden; opacity: 0; z-index: 1; transition: opacity 0.2s ease-in-out; } .post-body a.b-tooltip-container .b-tooltip iframe { width: 200px; height: 198px; max-width: none; border: none; border-radius: 20px; box-shadow: 1px 1px 3px 1px rgba(0, 0, 0, 0.2); } @media (hover: hover) { .post-body a.b-tooltip-container:hover .b-tooltip { visibility: visible; opacity: 1; } } </style> </div><div class='widget PopularPosts' data-version='2' id='PopularPosts1'> <h3 class='title'> Popular posts from this blog </h3> <div class='widget-content'> <div role='feed'> <article class='post' role='article'> <h3 class='post-title'><a href='https://dos2unixcode11.blogspot.com/2014/06/c-pinvoke-of-netuseradd-returns-24.html'>c# - PInvoke of NetUserAdd returns 24 -</a></h3> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> - <meta content='http://dos2unixcode11.blogspot.com/2014/06/c-pinvoke-of-netuseradd-returns-24.html'/> <a class='timestamp-link' href='https://dos2unixcode11.blogspot.com/2014/06/c-pinvoke-of-netuseradd-returns-24.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2014-06-15T03:22:00-07:00' title='2014-06-15T03:22:00-07:00'> June 15, 2014 </time> </a> </span> </div> </div> <div class='item-content float-container'> <div class='popular-posts-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> I am calling NetUserAdd and it is returning 24 for each call. Does anyone know 24 stands for? When I do not know what the error is, it is very difficult to debug it. I'm calling it a Windows XP machine running as a local administrator. I am also a local administrator on the target computer. I tried to do it with USER_INFO_1 and it worked fine. I need a level of control given by USER_INFO_2. This shows the return value for this call. They are further defined by numeric values. Unfortunately none of these values ​​= 24 I know this is a very specific question. I think I'm hoping to find a PInvoke / NetAddUser expert who can help me out there Here in case my code matters. [StructLayout (LayoutKind., Choracet = charset.unycode)] Public structure USER_INFO_2 {name of the public string; Public string password; Public int password_age; Public entities Private; Public string home_dir; Public string comment; Public integer flags; Public string script_path; Public int auth_... </div> <a class='snippet-fade r-snippet-fade hidden' href='https://dos2unixcode11.blogspot.com/2014/06/c-pinvoke-of-netuseradd-returns-24.html'></a> </div> <div class='jump-link flat-button ripple'> <a href='https://dos2unixcode11.blogspot.com/2014/06/c-pinvoke-of-netuseradd-returns-24.html' title='c# - PInvoke of NetUserAdd returns 24 -'> Read more </a> </div> </div> </article> <article class='post' role='article'> <h3 class='post-title'><a href='https://dos2unixcode11.blogspot.com/2010/05/nhibernate-passing-session-to-repository.html'>NHibernate Passing Session to the Repository -</a></h3> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> - <meta content='http://dos2unixcode11.blogspot.com/2010/05/nhibernate-passing-session-to-repository.html'/> <a class='timestamp-link' href='https://dos2unixcode11.blogspot.com/2010/05/nhibernate-passing-session-to-repository.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2010-05-15T03:22:00-07:00' title='2010-05-15T03:22:00-07:00'> May 15, 2010 </time> </a> </span> </div> </div> <div class='item-content float-container'> <div class='popular-posts-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> How do I go about passing a session for a repository class? We say that I have two projects 1) TestSite 2) Business Objects The Republican Business Objects Project is included in the project. The NHibernate session has been opened in the test site project. Now, I want to use the same session because the test site initiates the transaction on that session. Currently, I am using the following: var repository = New Customer Resor (_session); Of course, it looks ugly! I'm thinking in some way that a dependency injection frame can be tilted and I can be provided without entering the repository with the ejection object. In our WCF service, we actually use a unitofwork that wraps an operation and stores ISSN for that operation. . The repositories know how they are receiving a hint from the current unit of work under which they are running In case of testing we have a base test class, Those who are included in any test class, who touch the test database, we then control t... </div> <a class='snippet-fade r-snippet-fade hidden' href='https://dos2unixcode11.blogspot.com/2010/05/nhibernate-passing-session-to-repository.html'></a> </div> <div class='jump-link flat-button ripple'> <a href='https://dos2unixcode11.blogspot.com/2010/05/nhibernate-passing-session-to-repository.html' title='NHibernate Passing Session to the Repository -'> Read more </a> </div> </div> </article> <article class='post' role='article'> <h3 class='post-title'><a href='https://dos2unixcode11.blogspot.com/2012/09/objective-c-mouse-events-for.html'>objective c - Mouse events for an NSSegmentedCell subclass? -</a></h3> <div class='post-header'> <div class='post-header-line-1'> <span class='byline post-timestamp'> - <meta content='http://dos2unixcode11.blogspot.com/2012/09/objective-c-mouse-events-for.html'/> <a class='timestamp-link' href='https://dos2unixcode11.blogspot.com/2012/09/objective-c-mouse-events-for.html' rel='bookmark' title='permanent link'> <time class='published' datetime='2012-09-15T03:22:00-07:00' title='2012-09-15T03:22:00-07:00'> September 15, 2012 </time> </a> </span> </div> </div> <div class='item-content float-container'> <div class='popular-posts-snippet snippet-container r-snippet-container'> <div class='snippet-item r-snippetized'> I am trying to apply some basic tabs to the coco editor on which I am working. I am using an NSSegmentedControl and adding it as a tab. I'm using a custom NSSegmentedCell subclass for tabs to pull a little 'X' icon next to the text to close the tabs and now Till it is getting very greasy. However, I can not understand how to actually check the process of mouse events for tabs, whether someone has been placed on the 'x' icon (or clicked on) I tried to override the "mouse mood" in the NSSegmentedControl subclass, but for some strange reasons when I add a new segment to it (I set "setAcceptptsMouseMovedEvents" in awakeFromNib, do I have to set it somewhere else Is it?). NSSegmentedCells, there are no mouse tracking processing when the NSCell subclasses are done, on one hand, mouse tracking, which only starts when the control is clicked. So the question is, how do I process mouse events properly, either in NSSegmentedControl or in the NSSegme... </div> <a class='snippet-fade r-snippet-fade hidden' href='https://dos2unixcode11.blogspot.com/2012/09/objective-c-mouse-events-for.html'></a> </div> <div class='jump-link flat-button ripple'> <a href='https://dos2unixcode11.blogspot.com/2012/09/objective-c-mouse-events-for.html' title='objective c - Mouse events for an NSSegmentedCell subclass? -'> Read more </a> </div> </div> </article> </div> </div> </div><div class='widget HTML' data-version='2' id='HTML3'> <div class='widget-content'> <!-- PopAds.net Popunder Code for dos2unixcode11.blogspot.com --> <script type="text/javascript" data-cfasync="false"> /*<![CDATA[/* */ var _pop = _pop || []; _pop.push(['siteId', 2496317]); _pop.push(['minBid', 0]); _pop.push(['popundersPerIP', 0]); _pop.push(['delayBetween', 0]); _pop.push(['default', false]); _pop.push(['defaultPerDay', 0]); _pop.push(['topmostLayer', false]); (function() { var pa = document.createElement('script'); pa.type = 'text/javascript'; pa.async = true; var s = document.getElementsByTagName('script')[0]; pa.src = '//c1.popads.net/pop.js'; pa.onerror = function() { var sa = document.createElement('script'); sa.type = 'text/javascript'; sa.async = true; sa.src = '//c2.popads.net/pop.js'; s.parentNode.insertBefore(sa, s); }; s.parentNode.insertBefore(pa, s); })(); /*]]>/* */ </script> <!-- PopAds.net Popunder Code End --> </div> </div><div class='widget HTML' data-version='2' id='HTML1'> <div class='widget-content'> <script type="text/javascript" src="//ylx-1.com/slider.php?section=General&pub=435796&ga=g&side=random"></script> </div> </div></div> </main> </div> <footer class='footer section' id='footer' name='Footer'><div class='widget Attribution' data-version='2' id='Attribution1'> <div class='widget-content'> <div class='blogger'> <a href='https://www.blogger.com' rel='nofollow'> <svg class='svg-icon-24'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_post_blogger_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> Powered by Blogger </a> </div> <div class='image-attribution'> Theme images by <a href="http://www.offset.com/photos/394244">Michael Elkan</a> </div> </div> </div></footer> </div> </div> </div> <aside class='sidebar-container container sidebar-invisible' role='complementary'> <div class='navigation'> <button class='svg-icon-24-button flat-icon-button ripple sidebar-back'> <svg class='svg-icon-24'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_arrow_back_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </button> </div> <div class='sidebar_top_wrapper'> <div class='sidebar_top section' id='sidebar_top' name='Sidebar (top)'><div class='widget Profile' data-version='2' id='Profile1'> <div class='wrapper solo'> <div class='widget-content individual'> <a href='https://www.blogger.com/profile/06912243864490924105' rel='nofollow'> <div class='default-avatar-wrapper'> <svg class='svg-icon-24 avatar-icon'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_person_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </div> </a> <div class='profile-info'> <dl class='profile-datablock'> <dt class='profile-data'> <a class='profile-link g-profile' href='https://www.blogger.com/profile/06912243864490924105' rel='author nofollow'> Szoka </a> </dt> </dl> <a class='profile-link visit-profile pill-button' href='https://www.blogger.com/profile/06912243864490924105' rel='author'> Visit profile </a> </div> </div> </div> </div></div> </div> <div class='sidebar_bottom section' id='sidebar_bottom' name='Sidebar (bottom)'><div class='widget BlogArchive' data-version='2' id='BlogArchive1'> <details class='collapsible extendable'> <summary> <div class='collapsible-title'> <h3 class='title'> Archive </h3> <svg class='svg-icon-24 chevron-down'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_more_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> <svg class='svg-icon-24 chevron-up'> <use xlink:href='/responsive/sprite_v1_6.css.svg#ic_expand_less_black_24dp' xmlns:xlink='http://www.w3.org/1999/xlink'></use> </svg> </div> </summary> <div class='widget-content'> <div id='ArchiveList'> <div id='BlogArchive1_ArchiveList'> <div class='first-items'> <ul class='flat'> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/09/'>September 2015<span class='post-count'>576</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/08/'>August 2015<span class='post-count'>597</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/07/'>July 2015<span class='post-count'>572</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/06/'>June 2015<span class='post-count'>580</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/05/'>May 2015<span class='post-count'>626</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/04/'>April 2015<span class='post-count'>566</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/03/'>March 2015<span class='post-count'>592</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/02/'>February 2015<span class='post-count'>538</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2015/01/'>January 2015<span class='post-count'>546</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/09/'>September 2014<span class='post-count'>605</span></a> </li> </ul> </div> <div class='remaining-items'> <ul class='flat'> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/08/'>August 2014<span class='post-count'>567</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/07/'>July 2014<span class='post-count'>606</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/06/'>June 2014<span class='post-count'>542</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/05/'>May 2014<span class='post-count'>605</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/04/'>April 2014<span class='post-count'>566</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/03/'>March 2014<span class='post-count'>572</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/02/'>February 2014<span class='post-count'>586</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2014/01/'>January 2014<span class='post-count'>566</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/09/'>September 2013<span class='post-count'>599</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/08/'>August 2013<span class='post-count'>615</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/07/'>July 2013<span class='post-count'>612</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/06/'>June 2013<span class='post-count'>588</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/05/'>May 2013<span class='post-count'>590</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/04/'>April 2013<span class='post-count'>577</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/03/'>March 2013<span class='post-count'>587</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/02/'>February 2013<span class='post-count'>596</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2013/01/'>January 2013<span class='post-count'>572</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/09/'>September 2012<span class='post-count'>617</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/08/'>August 2012<span class='post-count'>590</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/07/'>July 2012<span class='post-count'>555</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/06/'>June 2012<span class='post-count'>571</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/05/'>May 2012<span class='post-count'>584</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/04/'>April 2012<span class='post-count'>577</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/03/'>March 2012<span class='post-count'>625</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/02/'>February 2012<span class='post-count'>592</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2012/01/'>January 2012<span class='post-count'>582</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/09/'>September 2011<span class='post-count'>539</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/08/'>August 2011<span class='post-count'>580</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/07/'>July 2011<span class='post-count'>608</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/06/'>June 2011<span class='post-count'>619</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/05/'>May 2011<span class='post-count'>566</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/04/'>April 2011<span class='post-count'>586</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/03/'>March 2011<span class='post-count'>572</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/02/'>February 2011<span class='post-count'>566</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2011/01/'>January 2011<span class='post-count'>587</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/09/'>September 2010<span class='post-count'>603</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/08/'>August 2010<span class='post-count'>607</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/07/'>July 2010<span class='post-count'>581</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/06/'>June 2010<span class='post-count'>574</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/05/'>May 2010<span class='post-count'>574</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/04/'>April 2010<span class='post-count'>563</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/03/'>March 2010<span class='post-count'>601</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/02/'>February 2010<span class='post-count'>552</span></a> </li> <li class='archivedate'> <a href='https://dos2unixcode11.blogspot.com/2010/01/'>January 2010<span class='post-count'>583</span></a> </li> </ul> </div> <span class='show-more pill-button'>Show more</span> <span class='show-less hidden pill-button'>Show less</span> </div> </div> </div> </details> </div> <div class='widget ReportAbuse' data-version='2' id='ReportAbuse1'> <h3 class='title'> <a class='report_abuse' href='https://www.blogger.com/go/report-abuse' rel='noopener nofollow' target='_blank'> Report Abuse </a> </h3> </div><div class='widget Navbar' data-version='2' id='Navbar1'><script type="text/javascript"> function setAttributeOnload(object, attribute, val) { if(window.addEventListener) { window.addEventListener('load', function(){ object[attribute] = val; }, false); } else { window.attachEvent('onload', function(){ object[attribute] = val; }); } } </script> <div id="navbar-iframe-container"></div> <script type="text/javascript" src="https://apis.google.com/js/platform.js"></script> <script type="text/javascript"> gapi.load("gapi.iframes:gapi.iframes.style.bubble", function() { if (gapi.iframes && gapi.iframes.getContext) { gapi.iframes.getContext().openChild({ url: 'https://www.blogger.com/navbar/953894213271141587?po\x3d873305248728006787\x26origin\x3dhttps://dos2unixcode11.blogspot.com', where: document.getElementById("navbar-iframe-container"), id: "navbar-iframe" }); } }); </script><script type="text/javascript"> (function() { var script = document.createElement('script'); script.type = 'text/javascript'; script.src = '//pagead2.googlesyndication.com/pagead/js/google_top_exp.js'; var head = document.getElementsByTagName('head')[0]; if (head) { head.appendChild(script); }})(); </script> </div></div> </aside> <script type="text/javascript" src="https://resources.blogblog.com/blogblog/data/res/608349471-indie_compiled.js" async="true"></script> <script type="text/javascript" src="https://www.blogger.com/static/v1/widgets/851759228-widgets.js"></script> <script type='text/javascript'> window['__wavt'] = 'AAPvtVlDgvIxeBdtSZWzQboVrM_E:1789426256979';_WidgetManager._Init('//www.blogger.com/rearrange?blogID\x3d953894213271141587','//dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html','953894213271141587'); _WidgetManager._SetDataContext([{'name': 'blog', 'data': {'blogId': '953894213271141587', 'title': 'Dos2Unix', 'url': 'https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html', 'canonicalUrl': 'http://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html', 'homepageUrl': 'https://dos2unixcode11.blogspot.com/', 'searchUrl': 'https://dos2unixcode11.blogspot.com/search', 'canonicalHomepageUrl': 'http://dos2unixcode11.blogspot.com/', 'blogspotFaviconUrl': 'https://dos2unixcode11.blogspot.com/favicon.ico', 'bloggerUrl': 'https://www.blogger.com', 'hasCustomDomain': false, 'httpsEnabled': true, 'enabledCommentProfileImages': true, 'gPlusViewType': 'FILTERED_POSTMOD', 'adultContent': false, 'analyticsAccountNumber': '', 'encoding': 'UTF-8', 'locale': 'en-GB', 'localeUnderscoreDelimited': 'en_gb', 'languageDirection': 'ltr', 'isPrivate': false, 'isMobile': false, 'isMobileRequest': false, 'mobileClass': '', 'isPrivateBlog': false, 'isDynamicViewsAvailable': true, 'feedLinks': '\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Dos2Unix - Atom\x22 href\x3d\x22https://dos2unixcode11.blogspot.com/feeds/posts/default\x22 /\x3e\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/rss+xml\x22 title\x3d\x22Dos2Unix - RSS\x22 href\x3d\x22https://dos2unixcode11.blogspot.com/feeds/posts/default?alt\x3drss\x22 /\x3e\n\x3clink rel\x3d\x22service.post\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Dos2Unix - Atom\x22 href\x3d\x22https://www.blogger.com/feeds/953894213271141587/posts/default\x22 /\x3e\n\n\x3clink rel\x3d\x22alternate\x22 type\x3d\x22application/atom+xml\x22 title\x3d\x22Dos2Unix - Atom\x22 href\x3d\x22https://dos2unixcode11.blogspot.com/feeds/873305248728006787/comments/default\x22 /\x3e\n', 'meTag': '', 'adsenseHostId': 'ca-host-pub-1556223355139109', 'adsenseHasAds': true, 'adsenseAutoAds': false, 'boqCommentIframeForm': true, 'loginRedirectParam': '', 'isGoogleEverywhereLinkTooltipEnabled': true, 'view': '', 'dynamicViewsCommentsSrc': '//www.blogblog.com/dynamicviews/4224c15c4e7c9321/js/comments.js', 'dynamicViewsScriptSrc': '//www.blogblog.com/dynamicviews/31d4351e075118ef', 'plusOneApiSrc': 'https://apis.google.com/js/platform.js', 'disableGComments': true, 'interstitialAccepted': false, 'sharing': {'platforms': [{'name': 'Get link', 'key': 'link', 'shareMessage': 'Get link', 'target': ''}, {'name': 'Facebook', 'key': 'facebook', 'shareMessage': 'Share to Facebook', 'target': 'facebook'}, {'name': 'BlogThis!', 'key': 'blogThis', 'shareMessage': 'BlogThis!', 'target': 'blog'}, {'name': 'X', 'key': 'twitter', 'shareMessage': 'Share to X', 'target': 'twitter'}, {'name': 'Pinterest', 'key': 'pinterest', 'shareMessage': 'Share to Pinterest', 'target': 'pinterest'}, {'name': 'Email', 'key': 'email', 'shareMessage': 'Email', 'target': 'email'}], 'disableGooglePlus': true, 'googlePlusShareButtonWidth': 0, 'googlePlusBootstrap': '\x3cscript type\x3d\x22text/javascript\x22\x3ewindow.___gcfg \x3d {\x27lang\x27: \x27en_GB\x27};\x3c/script\x3e'}, 'hasCustomJumpLinkMessage': false, 'jumpLinkMessage': 'Read more', 'pageType': 'item', 'postId': '873305248728006787', 'pageName': 'python - Can you access a subbed-classed model from within the\nsuper-class model in the Django ORM? -', 'pageTitle': 'Dos2Unix: python - Can you access a subbed-classed model from within the\nsuper-class model in the Django ORM? -'}}, {'name': 'features', 'data': {}}, {'name': 'messages', 'data': {'edit': 'Edit', 'linkCopiedToClipboard': 'Link copied to clipboard', 'ok': 'Ok', 'postLink': 'Post link'}}, {'name': 'template', 'data': {'name': 'custom', 'localizedName': 'Custom', 'isResponsive': true, 'isAlternateRendering': false, 'isCustom': true}}, {'name': 'view', 'data': {'classic': {'name': 'classic', 'url': '?view\x3dclassic'}, 'flipcard': {'name': 'flipcard', 'url': '?view\x3dflipcard'}, 'magazine': {'name': 'magazine', 'url': '?view\x3dmagazine'}, 'mosaic': {'name': 'mosaic', 'url': '?view\x3dmosaic'}, 'sidebar': {'name': 'sidebar', 'url': '?view\x3dsidebar'}, 'snapshot': {'name': 'snapshot', 'url': '?view\x3dsnapshot'}, 'timeslide': {'name': 'timeslide', 'url': '?view\x3dtimeslide'}, 'isMobile': false, 'title': 'python - Can you access a subbed-classed model from within the\nsuper-class model in the Django ORM? -', 'description': ' Say that I inherited the model\x27s legacy as defined below. ArticleBase (Models.Model): title \x3d models.CharField () Author \x3d models.Char...', 'url': 'https://dos2unixcode11.blogspot.com/2014/05/python-can-you-access-subbed-classed.html', 'type': 'item', 'isSingleItem': true, 'isMultipleItems': false, 'isError': false, 'isPage': false, 'isPost': true, 'isHomepage': false, 'isArchive': false, 'isLabelSearch': false, 'postId': 873305248728006787}}, {'name': 'widgets', 'data': [{'title': 'Search This Blog', 'type': 'BlogSearch', 'sectionId': 'search_top', 'id': 'BlogSearch1'}, {'title': 'Dos2Unix (Header)', 'type': 'Header', 'sectionId': 'header', 'id': 'Header1'}, {'title': 'Featured post', 'type': 'FeaturedPost', 'sectionId': 'page_body', 'id': 'FeaturedPost1', 'postId': '3149543043222791801'}, {'title': 'Blog Posts', 'type': 'Blog', 'sectionId': 'page_body', 'id': 'Blog1', 'posts': [{'id': '873305248728006787', 'title': 'python - Can you access a subbed-classed model from within the\nsuper-class model in the Django ORM? -', 'showInlineAds': true}], 'headerByline': {'regionName': 'header1', 'items': [{'name': 'share', 'label': ''}, {'name': 'timestamp', 'label': '-'}]}, 'footerBylines': [{'regionName': 'footer1', 'items': [{'name': 'comments', 'label': ''}, {'name': 'icons', 'label': ''}]}, {'regionName': 'footer2', 'items': [{'name': 'labels', 'label': ''}]}, {'regionName': 'footer3', 'items': [{'name': 'location', 'label': ''}]}], 'allBylineItems': [{'name': 'share', 'label': ''}, {'name': 'timestamp', 'label': '-'}, {'name': 'comments', 'label': ''}, {'name': 'icons', 'label': ''}, {'name': 'labels', 'label': ''}, {'name': 'location', 'label': ''}]}, {'title': '', 'type': 'PopularPosts', 'sectionId': 'page_body', 'id': 'PopularPosts1', 'posts': [{'title': 'c# - PInvoke of NetUserAdd returns 24 -', 'id': 8415555252008741755}, {'title': 'NHibernate Passing Session to the Repository -', 'id': 5201716314645606722}, {'title': 'objective c - Mouse events for an NSSegmentedCell subclass? -', 'id': 6126575972190493455}]}, {'title': '', 'type': 'HTML', 'sectionId': 'page_body', 'id': 'HTML3'}, {'title': '', 'type': 'HTML', 'sectionId': 'page_body', 'id': 'HTML1'}, {'type': 'Attribution', 'sectionId': 'footer', 'id': 'Attribution1'}, {'title': 'About Me', 'type': 'Profile', 'sectionId': 'sidebar_top', 'id': 'Profile1'}, {'title': '', 'type': 'BlogArchive', 'sectionId': 'sidebar_bottom', 'id': 'BlogArchive1'}, {'title': '', 'type': 'ReportAbuse', 'sectionId': 'sidebar_bottom', 'id': 'ReportAbuse1'}, {'title': 'Navbar', 'type': 'Navbar', 'sectionId': 'sidebar_bottom', 'id': 'Navbar1'}]}]); _WidgetManager._RegisterWidget('_BlogSearchView', new _WidgetInfo('BlogSearch1', 'search_top', document.getElementById('BlogSearch1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HeaderView', new _WidgetInfo('Header1', 'header', document.getElementById('Header1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_FeaturedPostView', new _WidgetInfo('FeaturedPost1', 'page_body', document.getElementById('FeaturedPost1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogView', new _WidgetInfo('Blog1', 'page_body', document.getElementById('Blog1'), {'cmtInteractionsEnabled': false, 'lightboxEnabled': true, 'lightboxModuleUrl': 'https://www.blogger.com/static/v1/jsbin/2478479919-lbx__en_gb.js', 'lightboxCssUrl': 'https://www.blogger.com/static/v1/v-css/828616780-lightbox_bundle.css'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_PopularPostsView', new _WidgetInfo('PopularPosts1', 'page_body', document.getElementById('PopularPosts1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML3', 'page_body', document.getElementById('HTML3'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_HTMLView', new _WidgetInfo('HTML1', 'page_body', document.getElementById('HTML1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_AttributionView', new _WidgetInfo('Attribution1', 'footer', document.getElementById('Attribution1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ProfileView', new _WidgetInfo('Profile1', 'sidebar_top', document.getElementById('Profile1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_BlogArchiveView', new _WidgetInfo('BlogArchive1', 'sidebar_bottom', document.getElementById('BlogArchive1'), {'languageDirection': 'ltr', 'loadingMessage': 'Loading\x26hellip;'}, 'displayModeFull')); _WidgetManager._RegisterWidget('_ReportAbuseView', new _WidgetInfo('ReportAbuse1', 'sidebar_bottom', document.getElementById('ReportAbuse1'), {}, 'displayModeFull')); _WidgetManager._RegisterWidget('_NavbarView', new _WidgetInfo('Navbar1', 'sidebar_bottom', document.getElementById('Navbar1'), {}, 'displayModeFull')); </script> </body> </html>