From c98b205f9d67a1e0360e3c07ca4632082e68a3a6 Mon Sep 17 00:00:00 2001 From: mohsentaba Date: Wed, 24 Dec 2025 10:15:48 +0330 Subject: [PATCH] swagger docs updated. --- apps/hadis/docs.py | 162 ++++++++++-------- .../locale/fa/LC_MESSAGES/django.po | 36 ++-- 2 files changed, 106 insertions(+), 92 deletions(-) diff --git a/apps/hadis/docs.py b/apps/hadis/docs.py index b43bfef..6f86836 100644 --- a/apps/hadis/docs.py +++ b/apps/hadis/docs.py @@ -80,6 +80,7 @@ hadis_category_tree_swagger = swagger_auto_schema( "id": 10, "name": "Tafsir", "description": "Quran commentary", + "slug": "-330", "source_type": "quran", "hadis_count": 2, "has_hadis": False, @@ -93,6 +94,7 @@ hadis_category_tree_swagger = swagger_auto_schema( "id": 11, "name": "Surah Al-Fatiha", "description": "Opening chapter", + "slug": "-330", "source_type": "quran", "hadis_count": 2, "has_hadis": True, @@ -129,6 +131,7 @@ hadis_category_tree_swagger = swagger_auto_schema( "id": 20, "name": "Book of Faith", "description": "Iman topics", + "slug": "-330", "source_type": "hadith", "hadis_count": 1, "has_hadis": True, @@ -178,6 +181,7 @@ hadis_sync_swagger = swagger_auto_schema( { "id": 1001, "number": 45, + "slug": "достоинство-молитвы-и-ее-место-в-религии", "category_id": 205, "title": "The Reward of Intentions", "title_narrator": "Imam Sadiq (as)", @@ -348,6 +352,11 @@ hadis_list_swagger = swagger_auto_schema( "source_type": "hadith", "sect_type": "sunni" }, + "status": { + "id": 130, + "title": "Прерванный", + "color": "orange" + }, "share_link": "http://example.com/hadis/1" }, { @@ -364,6 +373,11 @@ hadis_list_swagger = swagger_auto_schema( "source_type": "hadith", "sect_type": "sunni" }, + "status": { + "id": 130, + "title": "Прерванный", + "color": "orange" + }, "share_link": "http://example.com/hadis/2" } ] @@ -502,6 +516,7 @@ hadis_basic_swagger = swagger_auto_schema( examples={ "application/json": { "id": 1, + "slug": "достоинство-молитвы-и-ее-место-в-религии", "title": "The Opening", "title_narrator": "From Abu Hurairah", "text": "Actions are but by intention...", @@ -546,6 +561,7 @@ hadis_detail_swagger = swagger_auto_schema( examples={ "application/json": { "id": 1800, + "slug": "достоинство-молитвы-и-ее-место-в-религии", "number": 1, "hadis_status_text": "Agreed upon by all scholars", "hadis_status": { @@ -745,12 +761,14 @@ hadis_corrections_swagger = swagger_auto_schema( "title": "Translation Correction", "description": "Updated translation for better accuracy and clarity. The previous translation was slightly ambiguous in the context of intention and action.", "translation":"Actions are judged by intentions, and every person will have what they intended", + "share_link": 'null' }, { "id": 2, "title": "Authenticity Clarification", "description": "Additional scholarly notes on the authenticity and grading of this hadith. This hadith is considered authentic (sahih) by consensus of scholars.", "translation":"Actions are judged by intentions, and every person will have what they intended", + "share_link": 'null' } ] } @@ -783,11 +801,25 @@ hadis_collections_swagger = swagger_auto_schema( examples={ "application/json": [ { - "id": 1, - "title": "Collection Title", - "description": "Collection description", - "order": 1, - "status": True + "count": 2, + "next": 'null', + "previous": 'null', + "results": [ + { + "id": 9, + "title": "The Book of Intellect and Ignorance", + "summary": "A collection of narrations regarding the importance of reason.", + "slug": "the-book-of-intellect-and-ignorance", + "thumbnail": 'null' + }, + { + "id": 10, + "title": "The Book of Monotheism", + "summary": "Hadiths explaining the oneness of God.", + "slug": "the-book-of-monotheism", + "thumbnail": 'null' + } + ] } ] } @@ -924,40 +956,31 @@ transmitter_filters_swagger = swagger_auto_schema( description="list of transmitters filter data", examples={ "application/json": { - "count": 10, - "next": "http://api.example.com/transmitters/?page=2", - "previous": None, - "results": [ + "generations": [1,2,3,4,5], + "madhabs": [ + "shia", + "sunni" + ], + "reliabilities": [ { - "generations": [1,2,3,4,5], - "madhabs": [ - { - "text": "Shia", - "slug": "shia" - }, - { - "text": "Sunni", - "slug": "sunni" - }, - { - "text": "Hanafi", - "slug": "hanafi" - } - ], - "reliabilities": [ - { - "text": "Very Reliable", - "slug": "very-reliable" - }, - { - "text": "Reliable", - "slug": "reliable" - }, - { - "text": "Acceptable", - "slug": "acceptable" - }, - ] + "text": "Very Reliable", + "slug": "very-reliable" + }, + { + "text": "Reliable", + "slug": "reliable" + }, + { + "text": "Acceptable", + "slug": "acceptable" + }, + { + "text": "Weak", + "slug": "weak" + }, + { + "text": "Very Weak", + "slug": "very-weak" } ] } @@ -1040,6 +1063,7 @@ transmitter_sync_swagger = swagger_auto_schema( { "id": 51, "full_name": "Мухаммад ибн Якуб Кулейни", + "slug": "zurarah-bin-ayan", "biographical": { "full_name": "Мухаммад ибн Якуб Кулейни", "kunya": None, @@ -1111,6 +1135,7 @@ transmitter_sync_swagger = swagger_auto_schema( { "id": 56, "full_name": "Абу Дауд ас-Сиджистани", + "slug": "zurarah-bin-ayan", "biographical": { "full_name": "Абу Дауд ас-Сиджистани", "kunya": "Abu Daud", @@ -1368,6 +1393,7 @@ book_references_list_swagger = swagger_auto_schema( { "id": 4, "title": "book2", + "slug": "al-mizan", "rate": "1.20", "author": [ { @@ -1385,6 +1411,7 @@ book_references_list_swagger = swagger_auto_schema( { "id": 2, "title": "book", + "slug": "al-mizan", "rate": "1.20", "author": [ { @@ -2026,55 +2053,35 @@ categories_tree_by_sect_swagger = swagger_auto_schema( "slug": "tafsir-al-fatiha", "sect_id": 20, "sect_type": "shia", + "description": "Commentary and interpretation of the opening chapter of the Quran", "children_count": 0, "has_hadis": True, "hadis_count": 15 }, { - "id": 330, - "title": "Tafsir of Surah Al-Fatiha", + "id": 331, + "title": "Tafsir of Surah Al-Baqarah", "source_type": "quran", - "slug": "tafsir-al-fatiha", + "slug": "tafsir-al-baqarah", "sect_id": 20, "sect_type": "shia", + "description": "Detailed explanation of Surah Al-Baqarah verses and their meanings", "children_count": 0, "has_hadis": True, - "hadis_count": 15 + "hadis_count": 28 }, - - { - "id": 330, - "title": "Tafsir of Surah Al-Fatiha", - "source_type": "quran", - "slug": "tafsir-al-fatiha", - "sect_id": 20, - "sect_type": "shia", - "children_count": 0, - "has_hadis": True, - "hadis_count": 15 - }, - { - "id": 331, - "title": "Tafsir of Surah Al-Baqarah", - "source_type": "quran", - "slug": "tafsir-al-baqarah", - "sect_id": 20, - "sect_type": "shia", - "children_count": 0, - "has_hadis": True, - "hadis_count": 28 - }, - { - "id": 332, - "title": "Tafsir of Surah Al-Imran", - "source_type": "quran", - "slug": "tafsir-al-imran", - "sect_id": 20, - "sect_type": "shia", - "children_count": 0, - "has_hadis": True, - "hadis_count": 22 - } + { + "id": 332, + "title": "Tafsir of Surah Al-Imran", + "source_type": "quran", + "slug": "tafsir-al-imran", + "sect_id": 20, + "sect_type": "shia", + "description": "Interpretation of Surah Al-Imran with scholarly insights", + "children_count": 0, + "has_hadis": True, + "hadis_count": 22 + } ] } @@ -2173,6 +2180,7 @@ categories_tree_by_sect_source_swagger = swagger_auto_schema( "slug": "", "sect_id": 20, "sect_type": "shia", + "description": "Commentary and interpretation of the opening chapter of the Quran", "children_count": 0, "has_hadis": True, "hadis_count": 10 @@ -2184,6 +2192,7 @@ categories_tree_by_sect_source_swagger = swagger_auto_schema( "slug": "-16", "sect_id": 20, "sect_type": "shia", + "description": "Detailed explanation of Surah Al-Baqarah verses and their meanings", "children_count": 0, "has_hadis": True, "hadis_count": 10 @@ -2195,6 +2204,7 @@ categories_tree_by_sect_source_swagger = swagger_auto_schema( "slug": "-32", "sect_id": 20, "sect_type": "shia", + "description": "Interpretation of Surah Al-Imran with scholarly insights", "children_count": 0, "has_hadis": True, "hadis_count": 10 diff --git a/dynamic_preferences/locale/fa/LC_MESSAGES/django.po b/dynamic_preferences/locale/fa/LC_MESSAGES/django.po index 48365ed..dff9266 100644 --- a/dynamic_preferences/locale/fa/LC_MESSAGES/django.po +++ b/dynamic_preferences/locale/fa/LC_MESSAGES/django.po @@ -8,7 +8,7 @@ msgid "" msgstr "" "Project-Id-Version: PACKAGE VERSION\n" "Report-Msgid-Bugs-To: \n" -"POT-Creation-Date: 2025-04-04 06:00+0330\n" +"POT-Creation-Date: 2025-12-23 15:18+0330\n" "PO-Revision-Date: YEAR-MO-DA HO:MI+ZONE\n" "Last-Translator: FULL NAME \n" "Language-Team: LANGUAGE \n" @@ -18,67 +18,71 @@ msgstr "" "Content-Transfer-Encoding: 8bit\n" "Plural-Forms: nplurals=2; plural=(n > 1);\n" -#: dynamic_preferences/admin.py:52 +#: .\dynamic_preferences\admin.py:59 #, fuzzy #| msgid "Verbose Name" msgid "Verbose name" msgstr "نام" -#: dynamic_preferences/admin.py:56 +#: .\dynamic_preferences\admin.py:63 #, fuzzy #| msgid "Help Text" msgid "Help text" msgstr "متن راهنما" -#: dynamic_preferences/admin.py:77 +#: .\dynamic_preferences\admin.py:84 msgid "Default Value" msgstr "مقدار پیشفرض" -#: dynamic_preferences/admin.py:86 dynamic_preferences/models.py:30 +#: .\dynamic_preferences\admin.py:93 .\dynamic_preferences\models.py:30 msgid "Section Name" msgstr "عنوان بخش" -#: dynamic_preferences/apps.py:10 +#: .\dynamic_preferences\admin.py:118 +msgid "Reset selected preferences to default values" +msgstr "" + +#: .\dynamic_preferences\apps.py:10 msgid "Settings" msgstr "" -#: dynamic_preferences/models.py:34 +#: .\dynamic_preferences\models.py:34 msgid "Name" msgstr "نام" -#: dynamic_preferences/models.py:37 +#: .\dynamic_preferences\models.py:37 msgid "Raw Value" msgstr "مقدار" -#: dynamic_preferences/models.py:51 +#: .\dynamic_preferences\models.py:51 msgid "Verbose Name" msgstr "نام" -#: dynamic_preferences/models.py:57 +#: .\dynamic_preferences\models.py:57 msgid "Help Text" msgstr "متن راهنما" -#: dynamic_preferences/models.py:94 +#: .\dynamic_preferences\models.py:94 msgid "Global preference" msgstr "تنطیمات عمومی" -#: dynamic_preferences/models.py:95 +#: .\dynamic_preferences\models.py:95 msgid "Global preferences" msgstr "تنطیمات عمومی" -#: dynamic_preferences/templates/dynamic_preferences/form.html:11 +#: .\dynamic_preferences\templates\dynamic_preferences\form.html:11 msgid "Submit" msgstr "ثبت" -#: dynamic_preferences/users/apps.py:11 +#: .\dynamic_preferences\users\apps.py:11 msgid "Preferences - Users" msgstr "" -#: dynamic_preferences/users/models.py:14 +#: .\dynamic_preferences\users\models.py:14 msgid "user preference" msgstr "" -#: dynamic_preferences/users/models.py:15 +#: .\dynamic_preferences\users\models.py:15 msgid "user preferences" msgstr ""