دعم الموقع

Heyyy am trying to get different genres eg comedy, action from the API in the python view function but am not able to.
def home(request): #logic for types of movies movie = get_trending() random_movies = random.randrange(0,18) poster = movie['results'][random_movies] trending = movie['results'] top_rated = get_Toprated()

#action movies
action = get_genres(28)

#animation movies
anime = get_genres(16)

#comegy movies
comedy = get_genres(35)

#horror
horror = get_genres(27)

#documentary
documentary = get_genres(99)

#adventure
adventure = get_genres(12)

#fantasy
fantasy = get_genres(14)

#thrillers
thriller = get_genres(53)

#science fiction
fictions = get_genres(878)

return render(request,'home.html',{
    "poster":poster,
    "trending":trending,
    "action":action,
    "horror":horror,
    "comedy":comedy(int(id)),
    "fantasy":fantasy,
    "adventure":adventure,
    "thriller":thriller,
    "fictions":fictions,
    "TopRated":top_rated,
    "documentary":documentary,
    "anime":anime,
})

here is my code. I think the problem is the context manager but am not able to figure out what to add in order to retrieve the data

لم تجد الفلم أو المسلسل ؟ سجل دخولك و انشئها

عام

s ركز شريط البحث
p افتح قائمة الملف الشخصي
esc اغلق النافذة المفتوحة
? افتح نافذة اختصارات لوحة المفاتيح

على كافة صفحات الوسائط

b ارجع للخلف (او للصفحة الام عند التطبيق)
e انتقل لصفحة التعديل

على كافة صفحات موسم المسلسل

(السهم الايمن) انتقل للموسم التالي
(السهم الايسر) انتقل للموسم السابق

على كافة صفحات حلقة المسلسل

(السهم الايمن) انتقل للحلقة التالية
(السهم الايسر) انتقل للحلقة السابقة

على كافة صفحات الصور

a افتح صفحة اضافة الصورة

على كافة صفحات التعديل

t افتح محدد الترجمة
ctrl+ s ارسال النموذج

على صفحات المناقشة

n انشى نقاش جديد
w تبديل حالة المتابعة
p تبديل عام / خاص
c تبديل اغلاق / فتح
a افتح الانشطة
r رد على النقاش
l انتقل لأخر رد
ctrl+ enter أرسل رسالتك
(السهم الايمن) الصفحة التالية
(السهم الايسر) الصفحة السابقة

الاعدادات

هل تريد تقييم او اضافة هذا العنصر للقائمة؟

تسجيل الدخول