I'm new to python but I've run into a hitch when trying to implement a variation of the observer pattern.
class X(models.Model):
a = models.ForeignKey(Voter)
b = models.CharField(max_length=200)
# Register
Y.register(X)
This doesn't seem to work because it says X is not defined. A couple of things are possible:
A) There is a way to refer to the current class (not the instance, but the class object).
B) You can't even run code outside a method. (I thought this may work almost like a static constructor - it would just get run once).