MongoEngine/mongoengine — pull request #484 by danielward (2013-10-05 19:55:00+00:00)
Title: Addition of app_label to MongoUser

Upon starting a new project with Django and lettuce, `python manage.py harvest` fails specifically due to MongoUser (exception detailed below) when using it as part of the custom user models feature of Django 1.5. After much looking around, the addition of a `Meta` class to MongoUser with the `app_label` attribute set to 'mongo_auth' resolved the issue for me.

```
Traceback (most recent call last):
File "/.../lib/python2.7/site-packages/lettuce/django/management/commands/harvest.py", line 167, in handle
result = runner.run()
File "/.../lib/python2.7/site-packages/lettuce/__init__.py", line 137, in run
self.loader.find_and_load_step_definitions()
File "/.../lib/python2.7/site-packages/lettuce/fs.py", line 49, in find_and_load_step_definitions
module = __import__(to_load)
File "/.../lib/python2.7/site-packages/mongoengine/django/mongo_auth/models.py", line 96, in
class MongoUser(models.Model):
File "/.../lib/python2.7/site-packages/django/db/models/base.py", line 93, in __new__
kwargs = {"app_label": model_module.__name__.split('.')[-2]}
IndexError: list index out of range
```