{"id":15135977,"url":"https://github.com/twtrubiks/django-tutorial","last_synced_at":"2025-04-09T05:10:41.067Z","repository":{"id":44729951,"uuid":"87149792","full_name":"twtrubiks/django-tutorial","owner":"twtrubiks","description":"Django 基本教學 - 從無到有 Django-Beginners-Guide 📝","archived":false,"fork":false,"pushed_at":"2024-09-08T07:33:52.000Z","size":73,"stargazers_count":505,"open_issues_count":0,"forks_count":122,"subscribers_count":29,"default_branch":"master","last_synced_at":"2025-04-02T04:03:42.637Z","etag":null,"topics":["beginners-guide","django","django-orm-crud","django-tutorial","pycharm","python"],"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/twtrubiks.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":"2017-04-04T05:03:28.000Z","updated_at":"2025-04-01T16:27:36.000Z","dependencies_parsed_at":"2024-01-14T02:18:45.926Z","dependency_job_id":"ccc675d0-8fd3-4227-88b6-e845bec0bfeb","html_url":"https://github.com/twtrubiks/django-tutorial","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2Fdjango-tutorial","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2Fdjango-tutorial/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2Fdjango-tutorial/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/twtrubiks%2Fdjango-tutorial/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/twtrubiks","download_url":"https://codeload.github.com/twtrubiks/django-tutorial/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247980837,"owners_count":21027808,"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":["beginners-guide","django","django-orm-crud","django-tutorial","pycharm","python"],"created_at":"2024-09-26T06:02:51.392Z","updated_at":"2025-04-09T05:10:41.049Z","avatar_url":"https://github.com/twtrubiks.png","language":"Python","readme":"# django-tutorial\n\n Django 基本教學 - 從無到有 Django-Beginners-Guide， 教你建立自己的第一個 [Django](https://github.com/django/django) 程式 📝\n\n* [Youtube Tutorial PART 1](https://youtu.be/tB3kwu2E0GM)\n* [Youtube Tutorial PART 2](https://youtu.be/2LP5WvhXLUM)\n\n[Django](https://github.com/django/django)  非常強大，尤其是 [Django REST framework](http://www.django-rest-framework.org/) ( DRF )，打造 REST API 極為方便快速，\n\n在這裡先帶大家進入 [Django](https://github.com/django/django) 的世界 :smile:\n\n- [django4_and_orm](https://github.com/twtrubiks/django-tutorial/tree/django4_and_orm) - ORM Lock 操作.\n\n- [django4_custom_management_commands](https://github.com/twtrubiks/django-tutorial/tree/django4_custom_management_commands) - custom management commands\n\n- [django4_multi_db](https://github.com/twtrubiks/django-tutorial/tree/django4_multi_db) - 介紹 Multiple databases\n\n- [django_contenttypes](https://github.com/twtrubiks/django-tutorial/tree/django_contenttypes) - 介紹 content types\n\n- [django5-managers](https://github.com/twtrubiks/django-tutorial/tree/django5-managers) - 介紹 managers\n\n- [django_pytest](https://github.com/twtrubiks/django_pytest_tutorial) - 介紹 django pytest\n\n## 簡介\n\n在開始手把手教大家動手做前，先來認識一下 Django 的設計模式，也就是 **MTV**，\n\n**Model** : 定義一些資料庫的東西 ( ORM )，這層通常是直接和資料有關。\n\n**Template** : 使用者基本上就是看到這層，也就是最後所呈現的 Template ( html )。\n\n**View** : 可以將這層看做是中間層，它主要負責 Model 和 Template 之間的業務邏輯。\n\n介紹了 Django 的設計模式，接下來你一定會問，那這有什麼好處 :question:\n\n最直接的好處就是，我們可以很明確且很快速的知道問題在哪裡，例如，今天可能頁面出了問題，\n\n這樣我們就會知道要先去 template 中找問題，而如果是關於資料庫的問題，則可能就要先去 Model\n\n中找，總之，就是不會像一隻無頭蒼蠅一樣不知道要去哪裡找問題 :relaxed:\n\n最後簡單將 Django 的 MTV 和 ASP.NET 中的 MVC 比較一下，\n\n| MTV                 | MVC            |\n|---------------------|----------------|\n| Model           | Model      |\n| Template        | View   |\n| View            |  Controller      |\n\n其實可以將 MTV 想成算是 MVC 的變形 :smirk:\n\n## 教學\n\n請先確認電腦有安裝 [Python](https://www.python.org/)\n\n接著我們安裝 [Django](https://github.com/django/django)\n\n請在你的命令提示字元 (cmd ) 底下輸入\n\n\u003epip install django==1.11.9\n\n( 會指定版本的原因是因為 **django 2.0** 開始有些東西不太一樣 )\n\n基本上安裝應該沒什麼問題，可以再使用 cmd 確認，如下圖\n\n![alt tag](http://i.imgur.com/O0esVe9.jpg)\n\n### 建立 Django Project\n\n建議直接安裝 [PyCharm](https://www.jetbrains.com/pycharm/) ，然後新增一個 Django Project\n\n![alt tag](http://i.imgur.com/ZVOUmVb.jpg)\n\n用 [PyCharm](https://www.jetbrains.com/pycharm/) 建立 project 還有一個好處，就是一些設定會先幚你設定好，不用全部重新自己動手設設定。\n\n這邊補充一下，因為蠻多人詢問的 :grimacing:\n\n上面這張圖的功能 ( 選項 )，只有 PyCharm Professional 才有這個功能，\n\n如果你是安裝一般的 PyCharm Community Edition，則沒有這個選項。\n\n但沒關係，可以使用指令的方式來建立，指令如下\n\n\u003e django-admin startproject django_tutorial\n\n### 執行 Django\n\n直接點選 [PyCharm](https://www.jetbrains.com/pycharm/) 右上角執行程式 ( 一個是Debug模式 )，如下圖\n\n![alt tag](http://i.imgur.com/CWDVlnj.jpg)\n\n正常來說，如果沒有任何錯誤，去瀏覽 [http://127.0.0.1:8000/](http://127.0.0.1:8000/)  可以看到下圖，\n\n![alt tag](http://i.imgur.com/qhgX4Tz.jpg)\n\n如果你沒有安裝 [PyCharm](https://www.jetbrains.com/pycharm/) 或你喜歡下指令，就必須在命令提示字元 (cmd ) 底下輸入\n\n\u003epython manage.py runserver\n\n![alt tag](http://i.imgur.com/PxvPJ9m.jpg)\n\n恭喜你~   成功第一步了   :smile:\n\n### 建立 Django App\n\n先建立一個觀念，在 [Django](https://github.com/django/django) 中，通常我們會依照 **功能** 去建議一個 App ， 例如範例的 musics ，代表他是 管理音樂 的部份。\n\n有了這個觀念之後，我們動手開始做吧～\n\n請在你的命令提示字元 (cmd ) 底下輸入\n\n\u003epython manage.py startapp musics\n\n如果順利執行，你會發現你的專案內多出一個 musics 資料夾\n\n![alt tag](http://i.imgur.com/nn5YY8A.jpg)\n\n***建立完請記得要將 App 加入設定檔***\n\n請在 settings.py 裡面的 **INSTALLED_APPS** 加入 musics (也就是你自己建立的 App 名稱)\n\n![alt tag](http://i.imgur.com/LCPHObL.jpg)\n\n### Views\n\n請先在 **templates** 裡面新增一個  **hello_django.html**，並在裡面輸入下方程式碼 (下圖)\n\n```html\n\u003c!DOCTYPE html\u003e\n\u003chtml lang=\"en\"\u003e\n\u003chead\u003e\n    \u003cmeta charset=\"UTF-8\"\u003e\n    \u003ctitle\u003eTitle\u003c/title\u003e\n\u003c/head\u003e\n\u003cbody\u003e\n    {{data}}\n\u003c/body\u003e\n\u003c/html\u003e\n```\n\n![alt tag](http://i.imgur.com/ULHqOBH.jpg)\n\nhello_django.html 裡面的第 8 行，只是透過  views.py 傳值過來而已。\n\n關於第 8 行 的用法，更多可以參考 [Django Templates](https://docs.djangoproject.com/en/1.10/ref/templates/)。\n\n接著我們將 views.py 裡面新增下方程式碼  (下圖)\n\n```python\nfrom django.shortcuts import render\n\n\n# Create your views here.\ndef hello_view(request):\n    return render(request, 'hello_django.html', {\n        'data': \"Hello Django \",\n    })\n\n```\n\n![alt tag](http://i.imgur.com/obbdTH4.jpg)\n\n views.py 裡面的第 7 行，就是回傳給 hello_django.html 的資料。\n\n 注意，最後還必須設定 URLconf。\n\n### URLconf\n\n請再將 urls.py 裡面增加一些程式碼，如下圖\n\n```python\nfrom django.conf.urls import url\nfrom django.contrib import admin\nfrom musics.views import hello_view\n\nurlpatterns = [\n    url(r'^admin/', admin.site.urls),\n    url(r'^hello/', hello_view),\n]\n\n```\n\n![alt tag](http://i.imgur.com/YOjwZyE.jpg)\n\n簡單講，就是將 views.py import 進來 (第 18 行)，\n\n並且設定他的 URL (第 22 行)\n\n最後執行 Django ， 然後瀏覽  [http://127.0.0.1:8000/hello/](http://127.0.0.1:8000/hello/)\n\n你應該會看到如下圖\n\n![alt tag](http://i.imgur.com/Wd79870.jpg)\n\n接下來我們來看 Models\n\n### Models\n\n定義出資料庫中的結構（schema），並且透過 Django 中的指令去建立資料庫。\n\n[Django](https://github.com/django/django) 預設是使用 [SQLite](https://www.sqlite.org/) ，如果想要修改為其他的資料庫，可以在 settings.py  裡面進行修改。\n\n首先，請先在 models.py 裡面增加下方程式碼 (下圖)\n\n```python\nfrom django.db import models\n\n\n# Create your models here.\nclass Music(models.Model):\n    song = models.TextField(default=\"song\")\n    singer = models.TextField(default=\"AKB48\")\n    last_modify_date = models.DateTimeField(auto_now=True)\n    created = models.DateTimeField(auto_now_add=True)\n\n    class Meta:\n        db_table = \"music\"\n\n```\n\ndefault : 代表默認值，也就是如果你沒有指定的話會用默認值。\n\nauto_now_add : 新增時會幚你自動加上建立時間。\n\nauto_now : 資料有更新時會幚你自動加上更新的時間。\n\n更多可以參考 [Django fields](https://docs.djangoproject.com/en/1.10/ref/models/fields/)\n\n![alt tag](http://i.imgur.com/cyjgYp5.jpg)\n\n接著在命令提示字元 (cmd ) 底下輸入\n\n\u003epython manage.py makemigrations\n\n![alt tag](http://i.imgur.com/mmqLn9F.jpg)\n\n\u003e python manage.py migrate\n\n![alt tag](http://i.imgur.com/8sCX6x6.jpg)\n\nmakemigrations ： 會幚你建立一個檔案，去記錄你更新了哪些東西。\n\nmigrate ： 根據 makemigrations 建立的檔案，去更新你的 DATABASE 。\n\n執行完上面的指令之後，\n\n你可以使用[SQLiteBrowser](http://sqlitebrowser.org/) 或  [PyCharm](https://www.jetbrains.com/pycharm/) 觀看 DATABASE，\n\n你會發現多出一個 **music** 的 table ( 如下圖 )\n\n![alt tag](http://i.imgur.com/xVbTtjq.jpg)\n\n有沒有注意到我們明明在 models.py 裡面就沒有輸入 id ，可是 database 裡面卻有 id 欄位，\n\n這是因為 Django 預設會幫你帶入，所以可以不用設定。\n\n❗ ❗ 這邊提一個狀況, 就是如果你手動去刪除 migrations 資料夾,\n\n然後你重新執行了 `makemigrations`, 正常產生資料夾,\n\n然後你又執行了 `migrate`, 你會發現他說沒有任何改變.\n\n原因是, 在 db 底下的 django_migrations 這張 table 會去紀錄\n\n```sql\nSELECT * FROM public.django_migrations\n```\n\n類似 0001_initial 這樣的東西, 然後正常應該要變 0002_xxx 之類的,\n\n可是現在還是 0001_initial, 所以系統會認為沒有更新, 所以沒有變化,\n\n這時候你需要手動刪除對應的 app name 的那比 record(從資料庫刪除),\n\n然後重新執行 `migrate` 即可,\n\n或是你可以參考 [Reversing migrations](https://docs.djangoproject.com/en/5.0/topics/migrations/#reversing-migrations)\n\n直接去 reverse 整個 app, 重新跑一次.\n\n```cmd\npython manage.py migrate musics zero\n```\n\n也可以透過指令去刪除 django_migrations 的 record 紀錄,\n\n```cmd\npython manage.py migrate musics 0001\n```\n\n### Django ORM\n\n先了解什麼是 CRUD ，他分別代表 Create, Retrieve, Update, Delete，\n\n[Django QuerySet API](https://docs.djangoproject.com/en/1.10/ref/models/querysets/) 可以讓你簡單的處理 CRUD 。\n\n直接使用 Python Console 簡單介紹 Django ORM\n\n![alt tag](http://i.imgur.com/JuBjDPR.jpg)\n\n記得必須先 import 你的 models\n\n\u003e from musics.models import Music\n\n![alt tag](http://i.imgur.com/Bog2YmN.jpg)\n\n#### Create\n\n![alt tag](http://i.imgur.com/mPwY3o7.jpg)\n\n\u003e Music.objects.create(song='song1', singer='SKE48')\n\n用[SQLiteBrowser](http://sqlitebrowser.org/) 或  [PyCharm](https://www.jetbrains.com/pycharm/) 觀看 DATABASE，如下圖，成功多了一比資料\n![alt tag](http://i.imgur.com/aemyLiy.jpg)\n\n或者\n\n\u003e Music.objects.create()\n\n![alt tag](http://i.imgur.com/VHQs5ts.jpg)\n\n為什麼沒帶參數也可以新增呢?\n\n這是因為 models.py 裡的 song 以及 singer 有設定 default ，所以可以不用帶入參數。\n\n#### Read\n\n\u003e Music.objects.all()\n\n![alt tag](http://i.imgur.com/WTSzn2U.jpg)\n\n\u003e Music.objects.get(pk=3)\n\n![alt tag](http://i.imgur.com/QACYB8x.jpg)\n\u003e Music.objects.filter(id=1)\n\n![alt tag](http://i.imgur.com/jFCM1op.jpg)\n\n#### Update\n\n\u003e data=Music.objects.filter(id=1)\n\u003e\n\u003e data.update(song='song_update')\n\n![alt tag](http://i.imgur.com/Dk1rsv3.jpg)\n\n執行完上述程式碼，就會發現資料被更新了 ( 如下圖 )\n\n![alt tag](http://i.imgur.com/OJT2UAT.jpg)\n\n#### Delete\n\n\u003e data=Music.objects.filter(id=4)\n\u003e\n\u003e data.delete()\n\n![alt tag](http://i.imgur.com/shWLKwn.jpg)\n\n執行完上述程式碼，就會發現資料被刪除了\n\n### Admin Site\n\n[Django](https://github.com/django/django) 內建有後台管理介面。\n\n請先確定 settings.py 裡的 INSTALLED_APPS 裡有 django.contrib.admin\n\n```python\nINSTALLED_APPS = [\n    'django.contrib.admin',\n    ......\n]\n\n```\n\n![alt tag](http://i.imgur.com/y3lw5P7.jpg)\n\n設定 URL\n\n![alt tag](http://i.imgur.com/FIfOnls.jpg)\n\n接著使用命令提示字元 (cmd ) 建立超級使用者\n\n\u003epython manage.py createsuperuser\n\n![alt tag](http://i.imgur.com/wqacaCR.jpg)\n\n#### 註冊 model\n\n我們可以註冊 model，讓後台可以操作 database\n\n請在 admin.py 裡面新增下方程式碼，這段程式碼只是去註冊 model 而已\n\n```python\nfrom django.contrib import admin\n\n# Register your models here.\nfrom django.contrib import admin\nfrom musics.models import Music\n\nadmin.site.register(Music)\n\n```\n\n![alt tag](http://i.imgur.com/A8k8rQc.jpg)\n\n接著執行 Django ，然後到  [http://127.0.0.1:8000/admin/](http://127.0.0.1:8000/admin/)，\n\n應該會看到下圖，我的 帳號/密碼 設定為 twtrubiks/password123\n\n![alt tag](http://i.imgur.com/vFrjyzs.jpg)\n\n現在，你可以在裡面對 Musics 執行 新增、查詢、修改、刪除 (CRUD)，也可以管理使用者。\n\n![alt tag](http://i.imgur.com/DYrJBgk.jpg)\n\n#### Model Field.choices\n\n因為蠻實用的，所以加入 Model Field.choices ，使用方法可參考 [models.py](https://github.com/twtrubiks/django-tutorial/blob/master/musics/models.py)  以及 [hello_django.html](https://github.com/twtrubiks/django-tutorial/blob/master/templates/hello_django.html)，\n\n`Choice` ，可以透過 `get_FOO_display()` 的方法取得名稱，如下\n\n```python\nTYPE_CHOICES = (\n    ('T1', 'type 1'),\n    ('T2', 'type 2'),\n    ('T3', 'type 3'),\n    ('T4', 'type 4'),\n)\n\nclass Music(models.Model):\n    ......\n    type = models.CharField(\n        max_length=2,\n        choices=TYPE_CHOICES,\n        default=\"T1\"\n    )\n\n    class Meta:\n        db_table = \"music\"\n\n    def display_type_name(self):\n        return self.get_type_display()\n```\n\n詳細可參考 [https://docs.djangoproject.com/en/1.11/ref/models/fields/#choices](https://docs.djangoproject.com/en/1.11/ref/models/fields/#choices)\n\n### Integrating Django with a legacy database\n\n如果說現在我們已經有一個 db，需要建立 model 讓他 map 到 db，這時候不可能手動一個一個打 :scream:\n\n好在 Django 有提供一個方法讓我們將既有的 db 轉化成 model ，我們只需要使用以下的指令\n\n```cmd\npython manage.py inspectdb \u003e models.py\n```\n\n這時候你可以打開 models.py，你應該會看到 map 到你 db 的 model，類似如下\n\n```python\nclass Music(models.Model):\n    id = models.IntegerField(primary_key=True)  # AutoField?\n    song = models.TextField()\n    singer = models.TextField()\n    last_modify_date = models.DateTimeField()\n    created = models.DateTimeField()\n\n    class Meta:\n        managed = False\n        db_table = 'music'\n\n\nclass Share(models.Model):\n    id = models.IntegerField(primary_key=True)  # AutoField?\n    name = models.TextField()\n    last_modify_date = models.DateTimeField()\n    created = models.DateTimeField()\n\n    class Meta:\n        managed = False\n        db_table = 'share'\n```\n\n更多詳細的說明請參考 [Auto-generate the models](https://docs.djangoproject.com/en/1.11/howto/legacy-databases/#auto-generate-the-models)\n\n恭喜你，基本上到這裡，已經是一個非常簡單的  [Django](https://github.com/django/django) 程式了，趕快動手下去玩玩吧 :stuck_out_tongue:\n\n### How to create customizing error pages\n\n[Youtube Tutorial - How to create customizing error pages](https://youtu.be/vUwuWc0nl3s)\n\n這部份教大家如何建立自己的 404 not found page 以及 500 error page，\n\n先到 [django_tutorial/settings.py](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/settings.py) 中設定幾個東西，\n\n分別是 `DEBUG` 和 `ALLOWED_HOSTS` ( 這兩個設定是為了顯示 error pages )，\n\n`INSTALLED_APPS` ( 這個則是為了要讓他找的到 template )，範例如下，\n\n```python\nDEBUG = False\n\nALLOWED_HOSTS = ['*']\n\n\n# Application definition\n\nINSTALLED_APPS = [\n    .....\n    'django_tutorial',\n]\n\n```\n\n補充，預設為 `DEBUG = True`，這時候 django 會使用 standard 404 debug template，所以要記得修改。\n\n建立 templates 資料夾，在底下建立 [page_404.html](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/templates/django_tutorial/error_pages/page_404.html) 以及 [page_500.html](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/templates/django_tutorial/error_pages/page_500.html)，\n\n然後再建立一個 views 資料夾，底下建立 [error_views.py](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/views/error_views.py)，範例如下，\n\n```python\nfrom django.shortcuts import render\n\n\ndef view_404(request):\n    return render(request, 'django_tutorial/error_pages/page_404.html', status=404)\n\n\ndef view_500(request):\n    return render(request, 'django_tutorial/error_pages/page_500.html', status=500)\n```\n\n整個資料夾的結構會像下圖這樣，\n\n![alt tag](https://i.imgur.com/kkpx5so.png)\n\n這邊補充說明一下，前面在 INSTALLED_APPS 中設定 `django_tutorial`，\n\n主要就是為了讓他可以抓到 `django_tutorial/error_pages/page_404.html`。\n\n[error_views.py](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/views/error_views.py) 你也可以模仿 django 的 source code，可參考 [django/views/defaults.py](https://github.com/django/django/blob/master/django/views/defaults.py)，\n\n我是用比較偷懶快速的寫法:smiley:\n\n最後就是在 [django_tutorial/urls.py](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/urls.py) 設定 handler404 以及 handler500，\n\n因為我們已經設定好 `view_404` 以及 `view_500` 了，所以只需要去 overridden，\n\n[django_tutorial/urls.py](https://github.com/twtrubiks/django-tutorial/blob/master/django_tutorial/urls.py) 可參考如下，\n\n```python\n....\n\nhandler404 = \"django_tutorial.views.error_views.view_404\"\nhandler500 = \"django_tutorial.views.error_views.view_500\"\n\n....\n\n```\n\n更多詳細資料可參考 [customizing-error-views](https://docs.djangoproject.com/en/1.11/topics/http/views/#customizing-error-views)。\n\n## 後記\n\n我是先接觸 [Flask](http://flask.pocoo.org/)，後來才接觸到 [Django](https://github.com/django/django) ，\n\n有些人一開始應該也會和我一樣覺得 [Django](https://github.com/django/django) 的設定很多，非常麻煩，\n\n但其實了解他之後，會發現他並沒有想像中的那麼複雜，而且功能非常強大。\n\n如果意猶未盡，延伸閱讀 :satisfied:\n\n* [Django-REST-framework 基本教學 - 從無到有 DRF-Beginners-Guide](https://github.com/twtrubiks/django-rest-framework-tutorial)\n\n* [django_social_login_tutorial](https://github.com/twtrubiks/django_social_login_tutorial) - 使用 Django 實現一個可以使用社交平台登入並且註冊的網站\n\n* [DRF-dataTable-Example-server-side](https://github.com/twtrubiks/DRF-dataTable-Example-server-side) - DataTables Example (server-side) - Python Django REST framework\n\n* [Django-shop-tutorial 基本教學 - 從無到有 Django-shop-tutorial 📝](https://github.com/twtrubiks/django-shop-tutorial) - 使用 Django 建立一個簡易版購物網站 😄\n\n* [django-celery-tutorial](https://github.com/twtrubiks/django-celery-tutorial) - 使用 Django 結合 Celery 😄\n\n* [django-recaptcha-tutorial](https://github.com/twtrubiks/django_recaptcha_tutorial) -  Django 結合 Google's reCAPTCHA 😄\n\n* [Deploying_Django_To_Heroku_Tutorial](https://github.com/twtrubiks/Deploying_Django_To_Heroku_Tutorial) - Deploying a Django App To Heroku Tutorial\n\n* [認識 Django OneToOneField , ForeignKey ,ManyToManyField](https://github.com/twtrubiks/django-field-tutorial)\n\n* [結合 Django + jQuery 實現無限捲軸 Infinite Scroll 📝](https://github.com/twtrubiks/ptt_beauty_infinite_scroll)\n\n## 執行環境\n\n* Python 3.4.3\n\n## Reference\n\n* [Django](https://www.djangoproject.com/)\n\n## Donation\n\n文章都是我自己研究內化後原創，如果有幫助到您，也想鼓勵我的話，歡迎請我喝一杯咖啡 :laughing:\n\n![alt tag](https://i.imgur.com/LRct9xa.png)\n\n[贊助者付款](https://payment.opay.tw/Broadcaster/Donate/9E47FDEF85ABE383A0F5FC6A218606F8)\n\n## License\n\nMIT license\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwtrubiks%2Fdjango-tutorial","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Ftwtrubiks%2Fdjango-tutorial","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Ftwtrubiks%2Fdjango-tutorial/lists"}