Paywall: first unit of each grade free; 1/3/6-month subscriptions; AI sold separately
- content: unit_is_free/has_unit_access; questions, node quiz, answer and lesson/node complete return 402 subscription_required outside the first unit without an active subscription. /api/home units carry requiresSubscription. - subscription.0013: monthly 498k, quarterly 798k, six-month 1,298k toman, unlimited hearts, 3 AI questions/day; packs stay on sale for more questions. - AI_DAILY_QUOTA_FREE default 3 -> 2. - /api/subscription/status adds planTitle, planDurationDays, aiDailyQuota. - tests: content/tests_paywall.py; existing unlock-order tests get a subscription. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
@@ -273,8 +273,9 @@ class NodeQuizTests(TestCase):
|
||||
مبحثی که هنوز چهار سوال ندارد نباید وانمود کند دارد — فرانت باید
|
||||
بتواند تفاوتِ «آزمونِ کوتاه» و «خطا» را بفهمد.
|
||||
"""
|
||||
# پایهی جدا تا فصلِ اولِ (رایگانِ) همان پایه باشد؛ پرداخت اینجا موضوع نیست.
|
||||
thin_unit = Unit.objects.create(
|
||||
grade=self.node.unit.grade, title='فصل ۵', order=2)
|
||||
grade=Grade.objects.create(title='پایه دهم', icon='', color=''), title='فصل ۵', order=1)
|
||||
thin = Node.objects.create(unit=thin_unit, title='کمسوال', order=1)
|
||||
lesson = Lesson.objects.create(node=thin, title='تنها درس')
|
||||
question = Question.objects.create(
|
||||
|
||||
Reference in New Issue
Block a user