{"id":15019285,"url":"https://github.com/illagrenan/django-upload-path","last_synced_at":"2026-01-20T19:32:14.670Z","repository":{"id":57422498,"uuid":"95564861","full_name":"illagrenan/django-upload-path","owner":"illagrenan","description":"Various implementations for the Django ``FileField/ImageField.upload_to`` model field attribute.","archived":false,"fork":false,"pushed_at":"2017-07-03T12:35:58.000Z","size":13,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-09-07T11:56:03.800Z","etag":null,"topics":["django","python3"],"latest_commit_sha":null,"homepage":"","language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/illagrenan.png","metadata":{"files":{"readme":"README.rst","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2017-06-27T14:04:54.000Z","updated_at":"2017-07-03T12:35:28.000Z","dependencies_parsed_at":"2022-09-13T15:40:45.674Z","dependency_job_id":null,"html_url":"https://github.com/illagrenan/django-upload-path","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/illagrenan/django-upload-path","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illagrenan%2Fdjango-upload-path","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illagrenan%2Fdjango-upload-path/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illagrenan%2Fdjango-upload-path/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illagrenan%2Fdjango-upload-path/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/illagrenan","download_url":"https://codeload.github.com/illagrenan/django-upload-path/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/illagrenan%2Fdjango-upload-path/sbom","scorecard":{"id":484282,"data":{"date":"2025-08-11","repo":{"name":"github.com/illagrenan/django-upload-path","commit":"a3518f8f06826807f6cebb0cacc06906dbc2ebdd"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":1.7,"checks":[{"name":"Token-Permissions","score":-1,"reason":"No tokens found","details":null,"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Code-Review","score":0,"reason":"Found 0/7 approved changesets -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"SAST","score":0,"reason":"no SAST tool detected","details":["Warn: no pull requests merged into dev branch"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":-1,"reason":"no dependencies found","details":null,"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"Dangerous-Workflow","score":-1,"reason":"no workflows found","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"Maintained","score":0,"reason":"0 commit(s) and 0 issue activity found in the last 90 days -- score normalized to 0","details":null,"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Signed-Releases","score":-1,"reason":"no releases found","details":null,"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Vulnerabilities","score":0,"reason":"26 existing vulnerabilities detected","details":["Warn: Project is vulnerable to: PYSEC-2018-6 / GHSA-2f9x-5v75-3qv4","Warn: Project is vulnerable to: PYSEC-2019-17 / GHSA-337x-4q8g-prc5","Warn: Project is vulnerable to: PYSEC-2020-36 / GHSA-3gh2-xw74-jmcw","Warn: Project is vulnerable to: PYSEC-2018-2 / GHSA-5hg3-6c2f-f3wr","Warn: Project is vulnerable to: PYSEC-2021-98 / GHSA-68w8-qjq3-2gfm","Warn: Project is vulnerable to: PYSEC-2019-10 / GHSA-6c7v-2f49-8h26","Warn: Project is vulnerable to: PYSEC-2019-13 / GHSA-6r97-cj55-9hrq","Warn: Project is vulnerable to: PYSEC-2019-79 / GHSA-7rp2-fm2h-wchj","Warn: Project is vulnerable to: GHSA-7xr5-9hcq-chf9","Warn: Project is vulnerable to: GHSA-8x94-hmjh-97hq","Warn: Project is vulnerable to: PYSEC-2017-44 / GHSA-9r8w-6x8c-6jr9","Warn: Project is vulnerable to: PYSEC-2019-11 / GHSA-c4qh-4vgv-qc6g","Warn: Project is vulnerable to: PYSEC-2019-12 / GHSA-h5jv-4p7w-64jg","Warn: Project is vulnerable to: PYSEC-2020-35 / GHSA-hmr4-m2h5-33qx","Warn: Project is vulnerable to: PYSEC-2018-5 / GHSA-r28v-mw67-m5p9","Warn: Project is vulnerable to: GHSA-rrqc-c2jx-6jgv","Warn: Project is vulnerable to: PYSEC-2019-14 / GHSA-v9qg-3j8p-r63v","Warn: Project is vulnerable to: PYSEC-2019-16 / GHSA-vfq6-hq5r-27r6","Warn: Project is vulnerable to: PYSEC-2019-18 / GHSA-wh4h-v3f2-r2pp","Warn: Project is vulnerable to: PYSEC-2021-140 / GHSA-9w8r-397f-prfh","Warn: Project is vulnerable to: PYSEC-2023-117 / GHSA-mrwq-x4v8-fh7p","Warn: Project is vulnerable to: PYSEC-2021-141 / GHSA-pq64-v7f5-gqh8","Warn: Project is vulnerable to: PYSEC-2025-49 / GHSA-5rjg-fvgr-3xxf","Warn: Project is vulnerable to: GHSA-cx63-2mw6-8hw5","Warn: Project is vulnerable to: PYSEC-2022-43012 / GHSA-r9hx-vwmv-q579","Warn: Project is vulnerable to: PYSEC-2022-43017 / GHSA-qwmp-2cf2-g9g6"],"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-19T17:24:47.745Z","repository_id":57422498,"created_at":"2025-08-19T17:24:47.745Z","updated_at":"2025-08-19T17:24:47.745Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28610608,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-20T18:56:40.769Z","status":"ssl_error","status_checked_at":"2026-01-20T18:54:26.653Z","response_time":117,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["django","python3"],"created_at":"2024-09-24T19:53:16.436Z","updated_at":"2026-01-20T19:32:14.653Z","avatar_url":"https://github.com/illagrenan.png","language":"Python","readme":"==================\nDjango Upload Path\n==================\n\n.. image:: https://img.shields.io/pypi/v/django-upload-path.svg\n    :target: https://pypi.python.org/pypi/django-upload-path\n    :alt: PyPi\n\n.. image:: https://img.shields.io/badge/license-MIT-blue.svg\n    :target: https://pypi.python.org/pypi/django-upload-path/\n    :alt: MIT\n\n.. image:: https://img.shields.io/travis/illagrenan/django-upload-path.svg\n    :target: https://travis-ci.org/illagrenan/django-upload-path\n    :alt: TravisCI\n\n.. image:: https://img.shields.io/coveralls/illagrenan/django-upload-path.svg\n    :target: https://coveralls.io/github/illagrenan/django-upload-path?branch=master\n    :alt: Coverage\n\n.. image:: https://img.shields.io/pypi/implementation/django-upload-path.svg\n    :target: https://pypi.python.org/pypi/django_brotli/\n    :alt: Supported Python implementations\n\n.. image:: https://img.shields.io/pypi/pyversions/django-upload-path.svg\n    :target: https://pypi.python.org/pypi/django_brotli/\n    :alt: Supported Python versions\n\nIntroduction\n------------\n\nThis application provides various implementations for the ``FileField/ImageField.upload_to`` attribute (`https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to \u003chttps://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.FileField.upload_to\u003e`_) (``upload_to`` attribute accepts callable).\n\nThese implementations are:\n\n- ``auto_cleaned_path`` will generate ``{MODEL_NAME}/{SAFE_UPLOADED_FILENAME}{SUFFIX}``\n- ``auto_cleaned_path_uuid4`` will generate ``{MODEL_NAME}/{SAFE_UPLOADED_FILENAME}{SEPARATOR}{UUID4}{SUFFIX}``\n- ``auto_cleaned_path_stripped_uuid4`` will generate ``{MODEL_NAME}/{UUID4}{SUFFIX}``\n\n\nExample\n=======\n\nFor example, how ``auto_cleaned_path`` works: First, the original file name (typically from the user) is always cleaned (using ``django.utils.text.slugify``). Then, a new path is generated that contains the model name.\n\nIf you have a ``MyModel`` model and the user uploads a ``foo-bar.txt`` file, the resulting path will be ``mymodel/foo-bar.txt``.\n\n.. code:: python\n\n    from django.db import models\n    from django_upload_path import auto_cleaned_path\n\n\n    class MyModel(models.Model):\n        file = models.FileField(upload_to=auto_cleaned_path)\n\n\nInstallation\n------------\n\n- Supported Python versions are: ``3.4.``, ``3.5``, ``3.6`` and ``3.7-dev``.\n- Supported Django versions are: ``1.8.x`` (LTS), ``1.9.x``, ``1.10.x`` and ``1.11.x`` (LTS).\n\n.. code:: shell\n\n    pip install django-upload-path\n\n**Do not** add the app to ``INSTALLED_APPS`` (it is useless).\n\nUsage\n-----\n\n.. code:: python\n\n    from django.db import models\n    from django_upload_path.upload_path import auto_cleaned_path, auto_cleaned_path_stripped_uuid4, auto_cleaned_path_uuid4\n\n\n    class MyModel(models.Model):\n        file1 = models.FileField(upload_to=auto_cleaned_path)\n        file2 = models.FileField(upload_to=auto_cleaned_path_stripped_uuid4)\n        file3 = models.FileField(upload_to=auto_cleaned_path_uuid4)\n\n\nNote: ``ImageField`` (`https://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ImageField \u003chttps://docs.djangoproject.com/en/dev/ref/models/fields/#django.db.models.ImageField\u003e`_) is also supported.\n\n\nLicense\n-------\n\nThe MIT License (MIT)\n\nCopyright (c) 2017 Vašek Dohnal (@illagrenan)\n\nPermission is hereby granted, free of charge, to any person obtaining a\ncopy of this software and associated documentation files (the\n\"Software\"), to deal in the Software without restriction, including\nwithout limitation the rights to use, copy, modify, merge, publish,\ndistribute, sublicense, and/or sell copies of the Software, and to\npermit persons to whom the Software is furnished to do so, subject to\nthe following conditions:\n\nThe above copyright notice and this permission notice shall be included\nin all copies or substantial portions of the Software.\n\nTHE SOFTWARE IS PROVIDED \"AS IS\", WITHOUT WARRANTY OF ANY KIND, EXPRESS\nOR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF\nMERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.\nIN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY\nCLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT,\nTORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE\nSOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillagrenan%2Fdjango-upload-path","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fillagrenan%2Fdjango-upload-path","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fillagrenan%2Fdjango-upload-path/lists"}