Name | django-loaddata JSON |
Version |
0.0.2
JSON |
| download |
home_page | https://github.com/Friskes/django-loaddata |
Summary | Extended django loaddata command for uploading fixtures |
upload_time | 2025-02-08 16:02:20 |
maintainer | None |
docs_url | None |
author | Friskes |
requires_python | >=3.9 |
license | MIT License
Copyright (c) 2025 Friskes
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.
|
keywords |
django
fixtures
database
cli
|
VCS |
 |
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
## Extended django loaddata command for uploading fixtures
<div align="center">
| Project | | Status |
|-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| CI/CD | | [](https://github.com/Friskes/django-loaddata/actions/workflows/publish-to-pypi.yml) |
| Quality | | [](https://codecov.io/github/Friskes/django-loaddata) |
| Package | | [](https://badge.fury.io/py/django-loaddata)   |
| Meta | | [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/astral-sh/ruff) |
</div>
## Benefits of using this cli
1. Adds the `--insert_only` flag to the loaddata command, which filters existing database records from the fixture and leaves only new records to insert, thereby preventing overwriting of field values (which may have been changed by the user) in existing records when loaddata is run again.
2. Adds the `--check_fields` flag, which performs the same functions as the `--insert_only` flag, but additionally remembers the current fields of the loaded table when the fixture is loaded for the first time, so that when adding a new field to the table and restarting loaddata, only the records from the fixture for these new fields are successfully installed, the old fields will not be changed.
## Install
1. Install package
```bash
pip install django-loaddata
```
2. Add app name to `INSTALLED_APPS`
```python
INSTALLED_APPS = [
'django_loaddata',
]
```
3. Run django migrate
```
python manage.py migrate
```
### Command to run the program:
```
python manage.py loaddata
```
## Contributing
We would love you to contribute to `django-loaddata`, pull requests are very welcome! Please see [CONTRIBUTING.md](https://github.com/Friskes/django-loaddata/blob/main/CONTRIBUTING.md) for more information.
Raw data
{
"_id": null,
"home_page": "https://github.com/Friskes/django-loaddata",
"name": "django-loaddata",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": "Django, Fixtures, Database, CLI",
"author": "Friskes",
"author_email": "Friskes <friskesx@gmail.com>",
"download_url": "https://files.pythonhosted.org/packages/d4/d1/8b9a8f82f6d7ca2f22096651b329739d58f38b147222d029c2e912997a6f/django_loaddata-0.0.2.tar.gz",
"platform": null,
"description": "## Extended django loaddata command for uploading fixtures\n\n<div align=\"center\">\n\n| Project | | Status |\n|-----------|:----|-------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|\n| CI/CD | | [](https://github.com/Friskes/django-loaddata/actions/workflows/publish-to-pypi.yml) |\n| Quality | | [](https://codecov.io/github/Friskes/django-loaddata) |\n| Package | | [](https://badge.fury.io/py/django-loaddata)   |\n| Meta | | [](https://github.com/python/mypy) [](https://spdx.org/licenses/) [](https://github.com/astral-sh/ruff) |\n\n</div>\n\n## Benefits of using this cli\n1. Adds the `--insert_only` flag to the loaddata command, which filters existing database records from the fixture and leaves only new records to insert, thereby preventing overwriting of field values (which may have been changed by the user) in existing records when loaddata is run again.\n2. Adds the `--check_fields` flag, which performs the same functions as the `--insert_only` flag, but additionally remembers the current fields of the loaded table when the fixture is loaded for the first time, so that when adding a new field to the table and restarting loaddata, only the records from the fixture for these new fields are successfully installed, the old fields will not be changed.\n\n## Install\n1. Install package\n ```bash\n pip install django-loaddata\n ```\n\n2. Add app name to `INSTALLED_APPS`\n ```python\n INSTALLED_APPS = [\n 'django_loaddata',\n ]\n ```\n\n3. Run django migrate\n ```\n python manage.py migrate\n ```\n\n### Command to run the program:\n```\npython manage.py loaddata\n```\n\n## Contributing\nWe would love you to contribute to `django-loaddata`, pull requests are very welcome! Please see [CONTRIBUTING.md](https://github.com/Friskes/django-loaddata/blob/main/CONTRIBUTING.md) for more information.\n",
"bugtrack_url": null,
"license": "MIT License\n \n Copyright (c) 2025 Friskes\n \n Permission is hereby granted, free of charge, to any person obtaining a copy\n of this software and associated documentation files (the \"Software\"), to deal\n in the Software without restriction, including without limitation the rights\n to use, copy, modify, merge, publish, distribute, sublicense, and/or sell\n copies of the Software, and to permit persons to whom the Software is\n furnished to do so, subject to the following conditions:\n \n The above copyright notice and this permission notice shall be included in all\n copies or substantial portions of the Software.\n \n THE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR\n IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,\n FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE\n AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER\n LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,\n OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE\n SOFTWARE.\n ",
"summary": "Extended django loaddata command for uploading fixtures",
"version": "0.0.2",
"project_urls": {
"Changelog": "https://github.com/Friskes/django-loaddata/releases/",
"Homepage": "https://github.com/Friskes/django-loaddata",
"Issues": "https://github.com/Friskes/django-loaddata/issues"
},
"split_keywords": [
"django",
" fixtures",
" database",
" cli"
],
"urls": [
{
"comment_text": null,
"digests": {
"blake2b_256": "a311f55fb5ae90035b4d8bc636d44c139bb0156aad935edb7308e397af9773d6",
"md5": "d7a23f4fe6f84d3717fb6f007d2380f8",
"sha256": "f594ffb70da0a7c2e539ccd44b362515b7b6bd5231a1e852b1f3c7f3354e5430"
},
"downloads": -1,
"filename": "django_loaddata-0.0.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d7a23f4fe6f84d3717fb6f007d2380f8",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14702,
"upload_time": "2025-02-08T16:02:18",
"upload_time_iso_8601": "2025-02-08T16:02:18.658319Z",
"url": "https://files.pythonhosted.org/packages/a3/11/f55fb5ae90035b4d8bc636d44c139bb0156aad935edb7308e397af9773d6/django_loaddata-0.0.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": null,
"digests": {
"blake2b_256": "d4d18b9a8f82f6d7ca2f22096651b329739d58f38b147222d029c2e912997a6f",
"md5": "7c8d57b36fc1d05af7672bb0180c240b",
"sha256": "823880af95bb1c3fa7cde44b187fbe0bb17584d2b1cd44cb9ca79beaa67499bd"
},
"downloads": -1,
"filename": "django_loaddata-0.0.2.tar.gz",
"has_sig": false,
"md5_digest": "7c8d57b36fc1d05af7672bb0180c240b",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 25506,
"upload_time": "2025-02-08T16:02:20",
"upload_time_iso_8601": "2025-02-08T16:02:20.220548Z",
"url": "https://files.pythonhosted.org/packages/d4/d1/8b9a8f82f6d7ca2f22096651b329739d58f38b147222d029c2e912997a6f/django_loaddata-0.0.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-02-08 16:02:20",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "Friskes",
"github_project": "django-loaddata",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "django-loaddata"
}