Unable to make custom Field as inner class of an Enum
This has nothing to do with Peewee as far as I can tell, but is an implementation detail of the `Enum` class.
 Okay, thanks.

Do you have any suggestions for a more Pythonic solution than the (somewhat confusing) `@staticmethod` decorator, or am I just overthinking this? I'm still learning Python and want to establish good habits. :)
 Use @staticmethod.
 Thanks!

## 

Sent from my tin cans and a piece of string. 

> On Jul 27, 2015, at 9:34 AM, Charles Leifer notifications@github.com wrote:
> 
> Use @staticmethod.
> 
> ―
> Reply to this email directly or view it on GitHub.

This might be a peculiar use case, but for better encapsulation I tried doing this:

```
from peewee import *
from enum import Enum
class Foo(Enum):
    foobar = 0
    qazquux = 1
    bleck = 2
    class Field(IntegerField):
        def db_value(self,value):
            return value.value
        def python_value(self,value):
            return Foo(value)

class TableWithFoo(BaseModel):
    stored_foo = Foo.Field()
```

which generates a `TypeError: 'Foo' object is not callable` error. However, if I add a `@staticmethod` decorator to the declaration of `class Field`, it works just fine (and behaves correctly).

The `@staticmethod` decorator is a suitable workaround but it seems inelegant. In other testing I've found that `Enum` base classes allow inner classes without that hack, so I'm guessing the problem lies with subclassing `IntegerField` although I haven't tried creating a custom class with a custom `Field` class inside of it to verify that.

Granted this is all a silly thing to just avoid having FooField as a top-level class, which makes no difference to the functionality or the readability of the code, but it just feels like it should be possible. :)
