MongoEngine / MongoEngine/mongoengine

connect and register_connection use different parameters for db name.

Open
#606 9 comments 0 reactions 1 assignee View on GitHub

@bagerard is already working on this.

Since Apr 24, 2019.

Client/Connect
Dominant language
Python
Stars
4.3k
Forks
1.2k
Avg merge
4h 41m
Merged PRs (30d)
11

Description

connect uses db as the database name, register_connection uses name.

mongoengine.connect(db, alias='default', **kwargs)
mongoengine.register_connection(alias, name, ... )

This causes problems for configuration, for example, I load my config from a json file. This means I need to translate {'db': 'xyz'} to {'name': 'xyz'} when using register_connection and ensure that the 'db' value is removed, or the register_connection function complains that it is an unknown argument and fails.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.