{"id":16383317,"url":"https://github.com/shakaran/django-cms-am","last_synced_at":"2026-03-16T18:35:13.562Z","repository":{"id":257370107,"uuid":"858059312","full_name":"shakaran/django-cms-am","owner":"shakaran","description":"Django CMS Agile Monkeys Coding Hiring Test","archived":false,"fork":false,"pushed_at":"2025-05-25T15:27:32.000Z","size":465,"stargazers_count":0,"open_issues_count":2,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-09T01:00:03.714Z","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":"gpl-3.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/shakaran.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":"CODE_OF_CONDUCT.md","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}},"created_at":"2024-09-16T08:27:33.000Z","updated_at":"2024-12-04T09:53:53.000Z","dependencies_parsed_at":"2024-09-16T10:06:39.814Z","dependency_job_id":"32918190-b630-4d53-ac66-131059e723d5","html_url":"https://github.com/shakaran/django-cms-am","commit_stats":{"total_commits":65,"total_committers":2,"mean_commits":32.5,"dds":"0.16923076923076918","last_synced_commit":"3ef16ca9211a70a4538613c5a5d64ddcb4e2329c"},"previous_names":["shakaran/django-cms-am"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/shakaran/django-cms-am","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakaran%2Fdjango-cms-am","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakaran%2Fdjango-cms-am/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakaran%2Fdjango-cms-am/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakaran%2Fdjango-cms-am/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/shakaran","download_url":"https://codeload.github.com/shakaran/django-cms-am/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/shakaran%2Fdjango-cms-am/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":259812944,"owners_count":22915193,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","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":"2024-10-11T04:07:59.212Z","updated_at":"2026-03-16T18:35:13.516Z","avatar_url":"https://github.com/shakaran.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"\n# Django CMS Agile Monkeys Hiring Test\n\n\u003e This repo covers a [Agile Monkeys](https://www.theagilemonkeys.com) hiring recruiting test for a Django app\n\n[![Maintenance](https://img.shields.io/badge/Maintained%3F-yes-green.svg)](https://GitHub.com/shakaran/django-cms-am/graphs/commit-activity)\n[![contributions welcome](https://img.shields.io/badge/contributions-welcome-brightgreen.svg?style=flat)](https://github.com/shakaran/django-cms-am/issues)\n[![Contributor Covenant](https://img.shields.io/badge/Contributor%20Covenant-2.0-4baaaa.svg)](CODE_OF_CONDUCT.md)\n[![Build Status](https://img.shields.io/endpoint.svg?url=https%3A%2F%2Factions-badge.atrox.dev%2Fboostercloud%2Fbooster%2Fbadge%3Fref%3Dmain\u0026style=flat)](https://actions-badge.atrox.dev/shakaran/django-cms-am/goto?ref=main)\n[![License: AGPL v3](https://img.shields.io/badge/License-AGPL_v3-blue.svg)](https://www.gnu.org/licenses/agpl-3.0)\n[![Conventional Commits](https://img.shields.io/badge/Conventional%20Commits-1.0.0-yellow.svg)](https://conventionalcommits.org)\n![Integration tests](https://github.com/shakaran/django-cms-am/actions/workflows/django.yml/badge.svg)\n\n![](doc/agile-monkeys-cover-repo.jpg)\n\n\n## 🚀 Environment Setup\n\n### 🐳 Needed tools\n\n- Python 3\n\n### 🛠️ Environment configuration\n\nEnable virtualenv enviroment for app repo:\n\n```bash\npython3 -m venv env\nsource env/bin/activate\n```\n\n## 👩‍💻 Project explanation\n\nThis repository contains a simple Django App with a Django REST API for customers.\n\n### 🔥 Application execution\n\nIt is fully dockerized, with a .env.sample file where you can customize your credentials so run first time with:\n\n```bash\ndocker-compose up --build\n```\n\nOr by steps:\n\n```bash\ndocker-compose build\ndocker-compose up\n```\n\nAfter than run the migrations for first time with:\n\n```bash\ndocker-compose exec web python manage.py migrate\n```\n\nThen create a \"root\" superuser with:\n\n```bash\ndocker-compose exec web python manage.py createsuperuser\n```\n\nThe static files could be collected with:\n\n```bash\ndocker-compose exec web python manage.py collectstatic --noinput\n```\n\nTo enter to Django container web app:\n\n```bash\ndocker-compose exec -it web bash\n```\n\nAccess the application at http://0.0.0.0/:8000 in your web browser.\n\nUse the provided Django admin interface by visiting http://0.0.0.0:8000/admin and logging in with the superuser credentials.\n\n\n### ✅ Tests execution\n\nYou can run the test with:\n\n```bash\ndocker-compose exec web python manage.py test\n```\n\nCreate an application oauth at [/admin/oauth2_provider/application/](http://0.0.0.0:8000/admin/oauth2_provider/application/)\n\n## Test with curl:\n\n### Authenticate a customer:\n\n```bash\ncurl -X POST http://0.0.0.0:8000/auth/token/ \\\n-d \"grant_type=password\u0026username=test\u0026password=test\u0026client_id=your_client_id\u0026client_secret=your_client_secret\"\n```\n\n```bash\n\ncurl -X POST http://0.0.0.0:8000/auth/token/ \\\n     -H \"Content-Type: application/x-www-form-urlencoded\" \\\n     -d \"grant_type=password\u0026username=testuser\u0026password=testpassword\u0026client_id=your-client-id\u0026client_secret=your-client-secret\"\n```\n\n### List all customers (GET /customers/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X GET http://0.0.0.0:8000/customers/\n```\n\n### Get details about a specific customer (GET /customers/{id}/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X GET http://0.0.0.0:8000/customers/1/\n```\n\n### Create a new customer (POST /customers/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X POST http://0.0.0.0:8000/customers/ \\\n     -F \"name=John\" \\\n     -F \"surname=Doe\" \\\n     -F \"customer_id=12345\" \\\n     -F \"photo=@/path/to/photo.jpg\"\n```\n\n### Update an existant customer (PUT /customers/{id}/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X PUT http://0.0.0.0:8000/customers/1/ \\\n     -F \"name=Jane\" \\\n     -F \"surname=Doe\" \\\n     -F \"customer_id=67890\" \\\n     -F \"photo=@/path/to/new_photo.jpg\"\n```\n\n### Delete a customer (DELETE /customers/{id}/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X DELETE http://0.0.0.0:8000/customers/1/\n```\n\n### List all users (GET /users/)\n\nThis endpoint is only available for admin users.\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X GET http://0.0.0.0:8000/users/\n```\n\n### Create a new user (POST /users/)\n\n```bash\n curl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X POST http://0.0.0.0:8000/users/ \\\n     -d \"username=newuser\u0026email=newuser@example.com\u0026password=newpassword\"\n```\n\n### Update an existant user (POST /users/) (PUT /users/{id}/)\n\n```bash\ncurl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X PUT http://0.0.0.0:8000/users/1/ \\\n     -d \"username=updateduser\u0026email=updateduser@example.com\"\n```\n\n### Delete a user (DELETE /users/{id}/)\n\n```bash\n     curl -H \"Authorization: Bearer YOUR_ACCESS_TOKEN\" \\\n     -X DELETE http://0.0.0.0:8000/users/1/\n```\n\n## Postman collection\n\nThere are a [provided Postman collection](postman-collection.json) for easy integration with all endpoints prefilled.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakaran%2Fdjango-cms-am","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fshakaran%2Fdjango-cms-am","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fshakaran%2Fdjango-cms-am/lists"}