# -*- encoding: utf-8 -*-
"""
Copyright (c) 2019 - present AppSeed.us
"""

from django.contrib import admin
# from pytest import Session
from django.contrib.sessions.models import Session
# Register your models here.
from .models import student,date_counter,insta_profile,course,spotplayer_license,ghore,videos,course_file,input,headline
# from jalali_date.admin import ModelAdminJalaliMixin, StackedInlineJalaliMixin, TabularInlineJalaliMixin	     
# from django_jalali.admin.filters import JDateFieldListFilter
# import django_jalali.admin as jadmin 
from django import forms
class studenttable(admin.ModelAdmin):
     model = student
     list_display =("name","phone", )
     list_display_links = ("name",)    
     search_fields = ['name' ,"phone" ,]
admin.site.register(headline)
admin.site.register(student,studenttable)
class sessiontable(admin.ModelAdmin):
     model = Session
     list_display =("session_key", )
     list_display_links = ("session_key",)
     search_fields = ['session_key' ,]

admin.site.register(Session,sessiontable)
admin.site.register(date_counter)
class inputtable(admin.ModelAdmin):
     model = input
     list_display =("name","input_id","count" )
     list_display_links = ("name",)
admin.site.register(input,inputtable)
admin.site.register(insta_profile)
class course_admin(admin.ModelAdmin):
     model = course
     list_display =("name","mablagh","hide","pack","free" )
     list_display_links = ("name",)
     info= forms.CharField( widget=forms.Textarea )
admin.site.register(course,course_admin)
class licensetable(admin.ModelAdmin):
     model = spotplayer_license
     list_display =("user","license", )
     list_display_links = ("user",)
     search_fields = ['user' ,"license" ]
admin.site.register(spotplayer_license,licensetable)
class ghoretable(admin.ModelAdmin):
     model = ghore
     list_display =("ghore_id","username", )
     list_display_links = ("username",)
     
     search_fields = ['username' ,"ghore_id" ]
admin.site.register(ghore,ghoretable)
class videotable(admin.ModelAdmin):
     model = videos
     list_display =("title","active","dore","video_id","player_url","file_url" )
     list_display_links = ("title",)
     list_filter=["dore"]
     search_fields = ['title',"dore","video_id"]
admin.site.register(videos,videotable)
admin.site.register(course_file)
