django - python observer pattern -
I'm new to python, but I've gone into a heart trying to apply the variation of the supervisor pattern. / P>
  class X (models.model): a = model It is not said that X is defined . Some things are possible:   A) There is a way of referring to the current class (examples, but class objects).  
 B) You can not even run the code outside of a method (I thought it could work almost like a static manufacturer - it will only run once).  
   
  There is nothing wrong with the code (limited) in class definition:  
  class X (object): print ("Loading X")  
  However, you can not reference x because it is not yet fully defined is. 
   
 
  
Comments
Post a Comment