{"id":15180547,"url":"https://github.com/davipythonweb/flix-api","last_synced_at":"2026-01-06T13:37:51.371Z","repository":{"id":242303488,"uuid":"809208084","full_name":"davipythonweb/flix-api","owner":"davipythonweb","description":"API de filmes com Django e DRF","archived":false,"fork":false,"pushed_at":"2024-07-28T01:43:44.000Z","size":77,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-02-12T00:36:17.145Z","etag":null,"topics":["django-framework","django-rest-framework","pytest","pytest-watch"],"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/davipythonweb.png","metadata":{"files":{"readme":"README.md","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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-06-02T02:48:51.000Z","updated_at":"2024-07-28T01:43:47.000Z","dependencies_parsed_at":"2024-06-12T10:41:52.643Z","dependency_job_id":"1a64b4d1-2782-47ea-ad00-87784d28edd2","html_url":"https://github.com/davipythonweb/flix-api","commit_stats":null,"previous_names":["davipythonweb/flix-api"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davipythonweb%2Fflix-api","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davipythonweb%2Fflix-api/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davipythonweb%2Fflix-api/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/davipythonweb%2Fflix-api/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/davipythonweb","download_url":"https://codeload.github.com/davipythonweb/flix-api/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":245707571,"owners_count":20659609,"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":["django-framework","django-rest-framework","pytest","pytest-watch"],"created_at":"2024-09-27T16:22:04.114Z","updated_at":"2026-01-06T13:37:51.321Z","avatar_url":"https://github.com/davipythonweb.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# API-Django\r\n\r\n\u003csummary\u003eflix-api\u003c/summary\u003e\r\n\r\n\r\n\u003cdetails\u003e\r\n\r\n`ìnicial`\r\n\r\n- CRUD de filmes\r\n`django_restframework`\r\n`permissoes admin -\u003e all`\r\n`permissoes user -\u003e safe_methods= GET, HEAD, OPTIONS`\r\n\r\n- Autenticação\r\n`djangorestframework-simplejwt`\r\n\r\n- comandos Django/bash\r\n`django-admin startproject core .`\r\n`python manage.py migrate`\r\n`python manage.py createsuperuser`\r\n`python manage.py runserver`\r\n`python manage.py startapp \u003cnome_do_app\u003e`\r\n`python mange.py makemigrations`\r\n\r\n`adm controller`\r\n\r\n*admsuper\r\n*Adm$50001\r\n\r\n`user_teste`\r\n*cinemark\r\n*cines@23\r\n\r\n\u003c/details\u003e\r\n\r\n## pytest\r\n\r\n`pip install pytest pytest-django`\r\n`pip install pytest-watch`\r\n\r\n### usage\r\n\r\n- executar scripts powershell\r\n\r\n`set-executionpolicy unrestricted`\r\n\r\n-runing pytest- rodar no terminal =\u003e pytest\r\n\r\n- para ver tudo =\u003e pytest -rP\r\n\r\n- runing unitest- para o test_django =\u003e python manage.py test\r\n- com lib pytest-watch =\u003e ptw\r\n\r\n\r\n\r\n#### usage in postman\r\n\r\n- via GET\r\n\r\n`1) gerar um access-token para o usuario no endpoint:localhost/api/v1/authentication/token/ passando no body:  {\"username\": \"\", \"password\": \"\"}`\r\n\r\n`2) usar o authorization Bearer token e colocar o access-token gerado com o usuario  cadastrado. exemplo de endpoint: localhost/api/v1/genres .Use o method POST para o request. OBS:authorizations para usuario normal=\u003e GET,HEAD,OPTIONS`\r\n\r\n`3) para gerar um novo access-token =\u003e acesse rota /api/authentication/token/refresh/ passando no body: {\"refresh\": \"\u003cyour refresh token\u003e\"}`\r\n\r\n- via POST\r\n\r\n`4) para requests: POST,PUT,PATCH,DELETE fazer o mesmo processo , mas com um usuario admin.`","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavipythonweb%2Fflix-api","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdavipythonweb%2Fflix-api","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdavipythonweb%2Fflix-api/lists"}