{ "info": { "author": "NuoDB", "author_email": "info@nuodb.com", "bugtrack_url": null, "classifiers": [], "description": "# NuoDB - Django\n\n[![Build Status](https://travis-ci.org/nuodb/nuodb-django.png?branch=master)](https://travis-ci.org/nuodb/nuodb-django)\n\nThis is the official Django adapter for [NuoDB](http://www.nuodb.com). It leverages the [NuoDB Python Driver](https://github.com/nuodb/nuodb-python).\n\n### Requirements\n\nThe Django version we currently support is Django 1.5.\n\nIf you haven't already, [Download and Install NuoDB](http://nuodb.com/download-nuodb/)\n\nIn the settings.py file in your project, set the `USE_TZ` flag to False. This is done because the timezone is detected when the connection is created. \n\nSet the `ENGINE` field in the `DATABASES/default` dictionary in settings.py to the django_pynuodb folder (if you installed using pip this is just `django_pynuodb`)\n\nYou can optionally set the schema by adding a `SCHEMA` field in the `DATABASES/default` dictionary in settings.py, if the schema is not specified it will default to `USER`\n\n### Setup\n\ngit clone and install it \n\n```\ngit clone https://github.com/nuodb/nuodb-django.git\ncd nuodb-django\npython setup.py install\n```\n\nor install with pip\n\n```\nsudo pip install django_pynuodb\n```\n\n### Migrating from an existing Django app\n\nTo migrate data from an exiting Django app using a different database, the process is similar to migrating from another database to NuoDB using the [Migration Tool](http://doc.nuodb.com/display/doc/NuoDB+Migrator). The difference here is that we will be skpping the schema command. Django requires a specific file structure to function correctly, so in order to ensure that our Django app has the same structure in NuoDB as it does with a different database we will use Django's syncdb command to set up our schema.\n\nTo illustrate the steps involved we will use an app deployed with postgresql as an example...\n\nSteps:\n\n1) Using the NuoDB Migrator, dump the data from your postgresql Django app into a csv file.\n\n```\n$NUODB_HOME/bin/nuodb-migrator dump --source.driver=org.postgresql.Driver --source.url=jdbc:postgresql://localhost/test --source.username=postgres --output.type=csv --output.path=/tmp/dump.cat\n```\n\n2) From your Django app configured to use NuoDB (for an example of this look in the Sample section below.) perform a syncdb.\n\n```\npython manage.py syncdb\n```\n\n3) We only performed this syncdb so that we could get the correct table structure for our database. The next step is to empty out the data that Django creates for us so that we have a clean database to import our data from postgresql. We do this using the TRUNCATE TABLE command in nuosql.\n\n```\nnuosql test --user dba --password goalie\nSQL> show tables\n\n\tTables in schema USER\n\n\t\tAUTH_GROUP\n\t\tAUTH_GROUP_PERMISSIONS\n\t\tAUTH_PERMISSION\n\t\tAUTH_USER\n\t\tAUTH_USER_GROUPS\n\t\tAUTH_USER_USER_PERMISSIONS\n\t\tDJANGO_CONTENT_TYPE\n\t\tDJANGO_SESSION\n\t\tDJANGO_SITE\nSQL> truncate table user.auth_group;\nSQL> truncate table user.auth_group_permissions;\nSQL> truncate table user.auth_permission;\nSQL> truncate table user.auth_user;\nSQL> truncate table user.auth_user_groups;\nSQL> truncate table user.auth_user_user_permissions;\nSQL> truncate table user.django_content_type;\nSQL> truncate table user.django_session;\nSQL> truncate table user.django_site;\n```\n\n4) For our last step we need to import the data from our postgresql database into our new NuoDB database. For this we are going to use the NuoDB Migrator tool's load command.\n\n```\n$NUODB_HOME/bin/nuodb-migrator load --target.url=jdbc:com.nuodb://localhost/test?schema=USER --target.username=dba --target.password=goalie --input.path=/tmp/dump.cat\n```\n\n\n### Sample\n\nHere is a sample database dictionary\n\n```\nDATABASES = {\n 'default': {\n 'ENGINE': 'django_pynuodb',\n 'NAME': 'test',\n 'DOMAIN_USER': 'domain', # domain credentials\n 'DOMAIN_PASSWORD': 'bird',\n 'DBA_USER': 'dba',\t \t\t\t# database credentials\n 'DBA_PASSWORD': 'goalie',\n 'SCHEMA': '', \t\t\t\t\t# optional\n 'HOST': 'localhost',\n 'PORT': '48004',\n }\n}\n```\n\nSet the `USE_TZ` flag to `False`\n\n```\nUSE_TZ = False\n```\n\n\n### Note\n\n* If you want to add a site to your Django project then you must first delete the example.com site. This is automatically generated by Django with a manually set primary key of 1 and interferes with NuoDB automatically generating further primary keys. \n\n\n### License\n\n[NuoDB License](https://github.com/nuodb/nuodb-django/blob/master/LICENSE)", "description_content_type": null, "docs_url": null, "download_url": "UNKNOWN", "downloads": { "last_day": -1, "last_month": -1, "last_week": -1 }, "home_page": "https://github.com/nuodb/nuodb-django", "keywords": "nuodb django orm scalable cloud database", "license": "BSD licence, see LICENCE.txt", "maintainer": null, "maintainer_email": null, "name": "django_pynuodb", "package_url": "https://pypi.org/project/django_pynuodb/", "platform": "UNKNOWN", "project_url": "https://pypi.org/project/django_pynuodb/", "project_urls": { "Download": "UNKNOWN", "Homepage": "https://github.com/nuodb/nuodb-django" }, "release_url": "https://pypi.org/project/django_pynuodb/2.0.4/", "requires_dist": null, "requires_python": null, "summary": "NuoDB Extension for Django", "version": "2.0.4" }, "last_serial": 1297125, "releases": { "0.1": [ { "comment_text": "", "digests": { "md5": "0a616430e21f74e1871f93dd3633ce98", "sha256": "dfb9fe9839a1fb6645626f8687aca666d4a89f4fdc9203bae8e963bf5a371e18" }, "downloads": -1, "filename": "django_pynuodb-0.1.tar.gz", "has_sig": false, "md5_digest": "0a616430e21f74e1871f93dd3633ce98", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12883, "upload_time": "2013-07-10T18:11:00", "url": "https://files.pythonhosted.org/packages/c5/00/76d276c066f16e78a5a9d2f96469834ade8c69cf191e9137f3a4ab35cc65/django_pynuodb-0.1.tar.gz" } ], "0.2": [ { "comment_text": "", "digests": { "md5": "45247212a4a52a6247cbc74d2a4e690e", "sha256": "ae216c8e838e077120a52c02b1d72e5f01a3e988cde451a56f894d374ab9b239" }, "downloads": -1, "filename": "django_pynuodb-0.2.tar.gz", "has_sig": false, "md5_digest": "45247212a4a52a6247cbc74d2a4e690e", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12886, "upload_time": "2013-07-10T18:17:56", "url": "https://files.pythonhosted.org/packages/fd/72/1672ea2f6322f18e85149121ba8375ceb37aed125cbaf103a6f0b370e889/django_pynuodb-0.2.tar.gz" } ], "0.3": [ { "comment_text": "", "digests": { "md5": "fc515b3edbde1496b87c748eafc6b266", "sha256": "e4278594abde077f0846ae3d653d2a5ac5bbf237676a3230cb25b4c0089cbe0d" }, "downloads": -1, "filename": "django_pynuodb-0.3.tar.gz", "has_sig": false, "md5_digest": "fc515b3edbde1496b87c748eafc6b266", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13767, "upload_time": "2013-07-10T18:25:51", "url": "https://files.pythonhosted.org/packages/70/6d/472386489c33d4d91193f3e6f3fffb41995689ab45e150df29e06dbc9bbb/django_pynuodb-0.3.tar.gz" } ], "0.4": [ { "comment_text": "", "digests": { "md5": "a00b9d723ab9ff73a95b18d021f09d74", "sha256": "544155222fac69319b5517b5ec53bb40bb16a4c225cba71c7c1c5f5344d5b01f" }, "downloads": -1, "filename": "django_pynuodb-0.4.tar.gz", "has_sig": false, "md5_digest": "a00b9d723ab9ff73a95b18d021f09d74", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13804, "upload_time": "2013-07-15T18:44:26", "url": "https://files.pythonhosted.org/packages/7f/5d/c059f8280d157a7d3381436a01081249c20ccbd9ebf0edd83b8dae0ba7a7/django_pynuodb-0.4.tar.gz" } ], "0.5": [ { "comment_text": "", "digests": { "md5": "8a8ea52931ab996a2b07559de039ce01", "sha256": "139a78356735a4cbae03c9bb44856ffa03ec0832c7d5fe3fe1a6415725ae7dba" }, "downloads": -1, "filename": "django_pynuodb-0.5.tar.gz", "has_sig": false, "md5_digest": "8a8ea52931ab996a2b07559de039ce01", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13853, "upload_time": "2013-07-30T20:51:14", "url": "https://files.pythonhosted.org/packages/9a/35/010212b53f011c4bbd2bc6335b317a4b032d33efb615f5d97047d69dfd83/django_pynuodb-0.5.tar.gz" } ], "0.6": [ { "comment_text": "", "digests": { "md5": "b49fdabbcf2e543ebd43ceabd5c35793", "sha256": "d5155d4b28f2d2b1e18a394aa34d620d42725863618495d6fea7a20eabf5f0c7" }, "downloads": -1, "filename": "django_pynuodb-0.6.tar.gz", "has_sig": false, "md5_digest": "b49fdabbcf2e543ebd43ceabd5c35793", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13777, "upload_time": "2013-08-07T14:21:00", "url": "https://files.pythonhosted.org/packages/69/95/f79f0a7d8ac5622ea778b8ba4c918117d646a07a1cbceba31e6f47e09d21/django_pynuodb-0.6.tar.gz" } ], "0.7": [ { "comment_text": "", "digests": { "md5": "13a35bfbcdc331358b59650e644d0f71", "sha256": "2b4dfd8ccc3b638ba382038b346687808536ee32f2710edfbecbfc799762c84c" }, "downloads": -1, "filename": "django_pynuodb-0.7.tar.gz", "has_sig": false, "md5_digest": "13a35bfbcdc331358b59650e644d0f71", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 13839, "upload_time": "2013-08-07T15:10:03", "url": "https://files.pythonhosted.org/packages/a5/03/c29f3b0231161f784a395020c751b57b2900bea5607e94b60d40f140dc9f/django_pynuodb-0.7.tar.gz" } ], "0.8": [ { "comment_text": "", "digests": { "md5": "1ebc0c0578719273c334fb8215c6af53", "sha256": "49687201a50c61825bf5cde07950e86a1fbf1b8ab92d8580370e978cb62795d9" }, "downloads": -1, "filename": "django_pynuodb-0.8.tar.gz", "has_sig": false, "md5_digest": "1ebc0c0578719273c334fb8215c6af53", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11664, "upload_time": "2013-08-08T05:27:16", "url": "https://files.pythonhosted.org/packages/9c/0a/9c8586ea40e3be25dc320a9cbbc5244dbfb8ff99fcbba3257aeb3b3eb90e/django_pynuodb-0.8.tar.gz" } ], "0.9": [ { "comment_text": "", "digests": { "md5": "b815d796452fe01cf6fec845f134a6be", "sha256": "ee835e10435e5ab8d8efb2b3a6f9715315d38a20eda1a49a83ef27284ff17a42" }, "downloads": -1, "filename": "django_pynuodb-0.9.tar.gz", "has_sig": false, "md5_digest": "b815d796452fe01cf6fec845f134a6be", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 11733, "upload_time": "2013-08-14T15:23:35", "url": "https://files.pythonhosted.org/packages/b7/4d/c6888544db5e6b0359976bb02f0f187beddec27b0bb5a1f966e6bb68b89e/django_pynuodb-0.9.tar.gz" } ], "2.0": [ { "comment_text": "", "digests": { "md5": "9a86ae2e84b7593422a40c0960eed599", "sha256": "fb9dcc64679f6a40b8ceb8656c22c62e76116876aff1bb6b7a08a45e553106bb" }, "downloads": -1, "filename": "django_pynuodb-2.0.tar.gz", "has_sig": false, "md5_digest": "9a86ae2e84b7593422a40c0960eed599", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12650, "upload_time": "2013-10-23T22:46:26", "url": "https://files.pythonhosted.org/packages/0f/92/cd49fe1faab49b7e65889289fe1319dbb1b212745d0cf52cd5256ed99b44/django_pynuodb-2.0.tar.gz" } ], "2.0.3": [ { "comment_text": "", "digests": { "md5": "73e27393a32d84365a08bf75b2339e37", "sha256": "437662f7edad614ea7a7649d5a5efdb4235aca9f83670f546785062c12125493" }, "downloads": -1, "filename": "django_pynuodb-2.0.3.tar.gz", "has_sig": false, "md5_digest": "73e27393a32d84365a08bf75b2339e37", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12798, "upload_time": "2014-02-12T17:52:09", "url": "https://files.pythonhosted.org/packages/38/95/8a22e46525e00e72926983fcc4387c54b7df3418cc92d8e6879a565618a1/django_pynuodb-2.0.3.tar.gz" } ], "2.0.4": [ { "comment_text": "", "digests": { "md5": "0fbb6ff4c5ccb5ceb79c1174c09e6471", "sha256": "06eab51863d1bc01d9f937c5024716cbbfb291d5a4ba0c271e600354b8b28ce5" }, "downloads": -1, "filename": "django_pynuodb-2.0.4.tar.gz", "has_sig": false, "md5_digest": "0fbb6ff4c5ccb5ceb79c1174c09e6471", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12781, "upload_time": "2014-11-06T17:10:12", "url": "https://files.pythonhosted.org/packages/0c/5d/ac4d8e903a7e8dd0ea1381721babc23789bbd88a387c8ad2c1229cc9d05c/django_pynuodb-2.0.4.tar.gz" } ] }, "urls": [ { "comment_text": "", "digests": { "md5": "0fbb6ff4c5ccb5ceb79c1174c09e6471", "sha256": "06eab51863d1bc01d9f937c5024716cbbfb291d5a4ba0c271e600354b8b28ce5" }, "downloads": -1, "filename": "django_pynuodb-2.0.4.tar.gz", "has_sig": false, "md5_digest": "0fbb6ff4c5ccb5ceb79c1174c09e6471", "packagetype": "sdist", "python_version": "source", "requires_python": null, "size": 12781, "upload_time": "2014-11-06T17:10:12", "url": "https://files.pythonhosted.org/packages/0c/5d/ac4d8e903a7e8dd0ea1381721babc23789bbd88a387c8ad2c1229cc9d05c/django_pynuodb-2.0.4.tar.gz" } ] }