Login

Snippets by jose_lpa

Snippet List

MongoDB data load

This snippet loads data from JSON files into a MongoDB database. The code is related with the other snippet [MongoDB data dump](http://djangosnippets.org/snippets/2872/). To get it working, just create a ``MONGODB_NAME`` variable in settings, holding the name of your Mongo database. This can be edited to fit more your needs. The snippet requires ``Pymongo``, since it uses its bson module and the ``MongoClient``.

  • loaddata
  • fixtures
  • mongodb
Read More

MongoDB data dump

This Django management command just dumps data from a given MongoDB collection into a JSON file. To get it working, just create a ``MONGODB_NAME`` variable in settings, holding the name of your Mongo database. This can be edited to fit more your needs. The snippet requires Pymongo, since it uses its ``bson`` module and the ``MongoClient``.

  • dump
  • fixtures
  • mongodb
Read More

jose_lpa has posted 2 snippets.