{"id":16978103,"url":"https://github.com/yoonge/conduit-drf","last_synced_at":"2026-04-13T01:04:44.724Z","repository":{"id":242398714,"uuid":"795964751","full_name":"yoonge/conduit-drf","owner":"yoonge","description":"Exemplary back-end realworld application (called Conduit) in Python, built with Django + DRF + MySQL + MySQLClient + SimpleJWT, managed by PDM.","archived":false,"fork":false,"pushed_at":"2024-06-02T15:07:00.000Z","size":89,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2025-06-04T23:42:05.662Z","etag":null,"topics":["api","back-end","backend","conduit","demo","django","djangorestframework","drf","example","jwt","mysql","mysqlclient","pdm","python","realworld","restful","simplejwt"],"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/yoonge.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-05-04T14:29:11.000Z","updated_at":"2024-06-03T16:44:33.000Z","dependencies_parsed_at":null,"dependency_job_id":"4f3da7cf-56e0-4aac-9980-5bc8f169070e","html_url":"https://github.com/yoonge/conduit-drf","commit_stats":null,"previous_names":["yoonge/conduit-drf"],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/yoonge/conduit-drf","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoonge%2Fconduit-drf","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoonge%2Fconduit-drf/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoonge%2Fconduit-drf/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoonge%2Fconduit-drf/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/yoonge","download_url":"https://codeload.github.com/yoonge/conduit-drf/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/yoonge%2Fconduit-drf/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264726770,"owners_count":23654494,"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":["api","back-end","backend","conduit","demo","django","djangorestframework","drf","example","jwt","mysql","mysqlclient","pdm","python","realworld","restful","simplejwt"],"created_at":"2024-10-14T01:42:33.256Z","updated_at":"2026-04-13T01:04:44.688Z","avatar_url":"https://github.com/yoonge.png","language":"Python","funding_links":[],"categories":[],"sub_categories":[],"readme":"# ⌨️ Conduit DRF (Django REST Framework)\n\n![version](https://img.shields.io/badge/version-0.2.0-green) [![license](https://img.shields.io/badge/license-MIT-blue)](./LICENSE) ![django](https://img.shields.io/badge/django-4.2.11-113229) ![python](https://img.shields.io/badge/python-%3E%3D3.12.3-3776ab) ![mysql](https://img.shields.io/badge/mysql-8.3.0-02758f) ![pdm](https://img.shields.io/badge/pdm-2.15.1-ac75d7)\n\n## 💡 Introduction\n\nRealworld: \"The mother of all demo apps\" — Exemplary back-end Medium.com clone (called [Conduit](https://github.com/yoonge/conduit-drf)) in Python, built with Django + DRF + MySQL + MySQLClient + SimpleJWT.\n\n![pdm-managed](https://img.shields.io/badge/pdm-managed-blueviolet)\n![Django Badge](https://img.shields.io/badge/django-4?logo=django\u0026labelColor=%23092E20\u0026color=white)\n\n## 🔰 Getting Started\n\n```sh\n$ git clone https://github.com/yoonge/conduit-drf.git\n\n$ cd conduit-django-ssr\n\n# Activate the virtual environment\n$ source ./.venv/bin/activate   # MacOS\n$ ./.venv/Scripts/activate  # Windows\n\n$ pdm install\n\n$ pdm start\n\n# open anthoer terminal\n$ source ./.venv/bin/activate\n\n$ pdm makemigrations\n\n$ pdm migrate\n\n$ pdm createsuperuser\n```\n\nAnd then, open your browser and visit http://localhost:8000/api/\n\n\u003c!-- ## 📁 Index --\u003e\n\n\u003c!-- ## ⚡ Features --\u003e\n\n\u003c!-- ## 📌 TODO --\u003e\n\n## 📄 License\n\nConduit DRF is [MIT-licensed](./LICENSE).\n\n\u003c!-- ## 🔗 Links --\u003e\n\n---\n\n## 🏗️ Scaffold\n\n```sh\n$ pip install pdm\n\n$ mkdir conduit-drf \u0026\u0026 cd conduit-drf\n\n$ pdm init django\n\n# Activate the virtual environment\n$ source ./.venv/bin/activate   # MacOS\n$ ./.venv/Scripts/activate  # Windows\n\n$ py manage.py startapp api\n\n$ pdm add djangorestframework, djangorestframework-simplejwt, mysqlclient\n```\n\n## ⚙️ `settings.py`\n\n```py\n# Application definition\n\nINSTALLED_APPS = [\n    # \"django.contrib.admin\",\n    # \"django.contrib.auth\",\n    # \"django.contrib.contenttypes\",\n    # \"django.contrib.sessions\",\n    # \"django.contrib.messages\",\n    \"django.contrib.staticfiles\",\n    \"rest_framework\",\n    \"rest_framework_simplejwt\",\n    \"api\",\n]\n\nMIDDLEWARE = [\n    \"django.middleware.security.SecurityMiddleware\",\n    # \"django.contrib.sessions.middleware.SessionMiddleware\",\n    \"django.middleware.common.CommonMiddleware\",\n    # \"django.middleware.csrf.CsrfViewMiddleware\",\n    # \"django.contrib.auth.middleware.AuthenticationMiddleware\",\n    # \"django.contrib.messages.middleware.MessageMiddleware\",\n    \"django.middleware.clickjacking.XFrameOptionsMiddleware\",\n]\n\nROOT_URLCONF = \"conduit_drf.urls\"\n\nTEMPLATES = [\n    {\n        \"BACKEND\": \"django.template.backends.django.DjangoTemplates\",\n        \"DIRS\": [],\n        \"APP_DIRS\": True,\n        \"OPTIONS\": {\n            \"context_processors\": [\n                \"django.template.context_processors.debug\",\n                \"django.template.context_processors.request\",\n                # \"django.contrib.auth.context_processors.auth\",\n                # \"django.contrib.messages.context_processors.messages\",\n            ],\n        },\n    },\n]\n\n\n# ...\n\n\n# LANGUAGE_CODE = \"zh-hans\"\n\nTIME_ZONE = \"Asia/Shanghai\"\n\n\n# ...\n\n\nAUTH_USER_MODEL = \"api.User\"\n\n\nLOGIN_REDIRECT_URL = \"/api/\"\nLOGOUT_REDIRECT_URL = \"/api/\"\n\n\n# APPEND_SLASH = False\n# SILENCED_SYSTEM_CHECKS = ['urls.W002']\n\n\nNON_FIELD_ERRORS_KEY = \"custom_errors\"\n\n\n# REST framework\n\nREST_FRAMEWORK = {\n    \"DEFAULT_AUTHENTICATION_CLASSES\": (\n        \"rest_framework_simplejwt.authentication.JWTAuthentication\",\n        \"rest_framework.authentication.SessionAuthentication\",\n    ),\n    \"DEFAULT_PAGINATION_CLASS\": \"api.utils.pagination.CustomPagination\",\n    \"DEFAULT_PERMISSION_CLASSES\": (\n        \"rest_framework.permissions.IsAuthenticated\",\n    ),\n    \"UNAUTHENTICATED_USER\": None,\n}\n\n\n# DRF Simple JWT\n\nSIMPLE_JWT = {\n    \"USER_ID_FIELD\": \"_id\",\n    \"TOKEN_OBTAIN_SERIALIZER\": \"api.serializers.MyTokenObtainPairSerializer\",\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoonge%2Fconduit-drf","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fyoonge%2Fconduit-drf","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fyoonge%2Fconduit-drf/lists"}