{"id":50533079,"url":"https://github.com/umd-lib/umd-handle-django","last_synced_at":"2026-06-03T15:02:05.037Z","repository":{"id":323522646,"uuid":"1091176285","full_name":"umd-lib/umd-handle-django","owner":"umd-lib","description":"Django-based web application providing a REST-based Handle back-end service with administrative user interface.","archived":false,"fork":false,"pushed_at":"2025-11-18T15:46:23.000Z","size":82,"stargazers_count":0,"open_issues_count":1,"forks_count":0,"subscribers_count":0,"default_branch":"main","last_synced_at":"2025-11-18T16:42:36.352Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"Python","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/umd-lib.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null,"zenodo":null,"notice":null,"maintainers":null,"copyright":null,"agents":null,"dco":null,"cla":null}},"created_at":"2025-11-06T16:53:24.000Z","updated_at":"2025-11-18T15:46:27.000Z","dependencies_parsed_at":null,"dependency_job_id":null,"html_url":"https://github.com/umd-lib/umd-handle-django","commit_stats":null,"previous_names":["umd-lib/umd-handle-django"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/umd-lib/umd-handle-django","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-handle-django","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-handle-django/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-handle-django/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-handle-django/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/umd-lib","download_url":"https://codeload.github.com/umd-lib/umd-handle-django/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/umd-lib%2Fumd-handle-django/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":33870026,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-05-26T15:22:16.424Z","status":"online","status_checked_at":"2026-06-03T02:00:06.370Z","response_time":59,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2026-06-03T15:02:04.006Z","updated_at":"2026-06-03T15:02:05.032Z","avatar_url":"https://github.com/umd-lib.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# umd-handle-django\n\n[Django]-based web application providing a REST-based Handle back-end service\nwith administrative user interface.\n\n## Introduction\n\nThis application provides:\n\n* a REST backend for resolving Handle.Net Registry handles to URLs.\n* a REST-based API interface for administering handle to URL mappings\n* an HTTP-based user interface for administering handle to URL mappings\n\nAdditional documentation for this application is in the \"[docs/](docs/)\"\nsubdirectory, including:\n\n* [Architecture Decision Records](docs/adr/)\n* [OpenAPI v3 Spec](docs/umd-handle-open-api-v1.yml)\n* [Test Plan](docs/TestPlan.md)\n\n## Development Environment Setup\n\n* [Local Development Environment Setup](docs/DevelopmentEnvironmentLocal.md)\n\n## Building the Docker Image for local testing\n\nTo build and run locally\n\n```zsh\n# Build\ndocker build --no-cache -t docker.lib.umd.edu/umd-handle-django:latest .\n\n# Run\ndocker run -it \\\n-e DATABASE_URL=sqlite:///db.sqlite3 \\\n-e DEBUG=True \\\n-e SECRET_KEY=$(uuidgen | shasum -a 256 | cut -c-64) \\\n-e SERVER_PORT=3000 \\\n-p 3000:3000 \\\ndocker.lib.umd.edu/umd-handle-django:latest\n```\n\n## Building the Docker Image for K8s Deployment\n\nThe following procedure uses the Docker \"buildx\" functionality and the\nKubernetes \"build\" namespace to build the Docker image. This procedure should\nwork on both \"arm64\" and \"amd64\" MacBooks.\n\nThe image will be automatically pushed to the Nexus.\n\n### Local Machine Setup\n\nSee\n\u003chttps://github.com/umd-lib/devops/blob/main/k8s/docs/guides/DockerBuilds.md\u003e in\nGitHub for information about setting up a MacBook to use the Kubernetes\n\"build\" namespace.\n\n### Creating the Docker image\n\n1. In an empty directory, checkout the Git repository and switch into the\n   directory:\n\n    ```zsh\n    git clone git@github.com:umd-lib/umd-handle-django.git\n    cd umd-handle-django\n    ```\n\n2. Checkout the appropriate Git tag, branch, or commit for the Docker image.\n\n3. Set up an \"APP_TAG\" environment variable:\n\n    ```zsh\n    export APP_TAG=\u003cDOCKER_IMAGE_TAG\u003e\n    ```\n\n   where \\\u003cDOCKER_IMAGE_TAG\u003e is the Docker image tag to associate with the\n   Docker image. This will typically be the Git tag for the application version,\n   or some other identifier, such as a Git commit hash. For example, using the\n   Git tag of \"1.0.0\":\n\n    ```zsh\n    export APP_TAG=1.0.0\n    ```\n\n    Alternatively, to use the Git branch and commit:\n\n    ```zsh\n    export GIT_BRANCH=`git rev-parse --abbrev-ref HEAD`\n    export GIT_COMMIT_HASH=`git rev-parse HEAD`\n    export APP_TAG=${GIT_BRANCH}-${GIT_COMMIT_HASH}\n    ```\n\n4. Switch to the Kubernetes \"build\" namespace:\n\n    ```bash\n    kubectl config use-context build\n    ```\n\n5. Create the \"docker.lib.umd.edu/umd-handle-django\" Docker image:\n\n    ```bash\n    docker buildx build --no-cache --platform linux/amd64 --push --no-cache \\\n        --builder=kube  -f Dockerfile -t docker.lib.umd.edu/umd-handle-django:$APP_TAG .\n    ```\n\n   The Docker image will be automatically pushed to the Nexus.\n\n## Django Management Tasks\n\n### CSV Import\n\n#### Handles import\n\nEntries from the \"handles\" table of the Rails-based \"umd-handle\" application\ncan be imported using the \"db_import_handles_from_csv\" management command:\n\n```zsh\nsrc/manage.py db_import_handles_from_csv \u003cCSV_FILE\u003e\n```\n\nwhere \\\u003cCSV_FILE\u003e is a CSV file of entries to load. Existing entries in the\nDjango database that have matching prefix/suffix entries will be updated from\nthe CSV file.\n\nA \"--dry-run\" option is available to determine the number of entries that would\nbe added, updated, or are invalid.\n\n#### JWT Tokens import\n\nEntries from the \"jwt_token_logs\" table of the Rails-based \"umd-handle\"\napplication can be imported using the \"db_import_jwt_tokens_from_csv\" management\ncommand:\n\n```zsh\nsrc/manage.py db_import_jwt_tokens_from_csv \u003cCSV_FILE\u003e\n```\n\nwhere \\\u003cCSV_FILE\u003e is a CSV file of entries to load. Existing entries in the\nDjango database that have matching token will be updated from the CSV file.\n\nA \"--dry-run\" option is available to determine the number of entries that would\nbe added, updated, or are invalid.\n\n### JWT Tokens\n\nA list of JWT Tokens that have been issued by the system are stored in the\n\"JWTToken\" model.\n\nThe \"JWTToken\" model is only designed to be a record of issued tokens, to\nhelp identify which servers need to be updated if the tokens need to be\ninvalidated. The \"JWTToken\" model plays no role in validating tokens.\n\n#### Create a JWT token for authorizing access to the REST API\n\n```zsh\nsrc/manage.py jwt_create_token \"\u003cDESCRIPTION\u003e\"\n```\n\nwhere \\\u003cDESCRIPTION\u003e is a description of the server/service that will use the\ntoken.\n\n#### List JWT tokens\n\n```zsh\nsrc/manage.py jwt_list_tokens\n```\n\n## REST API\n\nThe REST API is specified in the OpenAPI v3.0 format:\n\n* v1: [docs/umd-handle-open-api-v1.yml](docs/umd-handle-open-api-v1.yml)\n\n## License\n\nSee the [LICENSE.md](LICENSE.md) file for license rights and limitations\n(Apache 2.0).\n\n---\n[Django]: https://www.djangoproject.com/\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-handle-django","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fumd-lib%2Fumd-handle-django","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fumd-lib%2Fumd-handle-django/lists"}