ghost opened this Issue Nov 5, 2012 · 2 comments


None yet

2 participants

ghost commented Nov 5, 2012

While still being undocumented, I found that your code does not necessarily adhere to both the mongoengine API (see django_mongoengine.utils.module where you will call register_connection), and to the conventions set forth by django for the

The first requires the name parameter to be a positional argument rather than a keyword argument and the second requires that all keys are in upper case while the mongoengine API requires all keyword arguments in their lower case form.

My workaround for getting your dev branch (BTW why can I not just fetch and checkout that branch but instead have to pull for testing things out?), is as follows:

In the for loop near the end of the init method of MongoEngine, I inserted the following code

        if 'NAME' not in conn_settings:
            raise ImproperlyConfigured("Missing `NAME` in %s connection settings" % (alias,))
        name = conn_settings['NAME']
        del conn_settings['NAME']
        effective_settings = {k.lower() : v for k, v in conn_settings.items()}
        self.connection.register_connection(alias, name, **effective_settings)

This got it up and running so far, without having tested any further except for getting the admin module up and running.

rozza commented Nov 6, 2012

Thanks for the heads up - will look into documentation, django 1.5 support in the next couple of weeks.

You should be able to fork and do a pull request from dev branch - its just a git branch.


added MONGODB_DATABASES to readme, and i think it's better leave it as it is; we just use settings format which mongoengine accepts;
closing issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment