from django.contrib import admin
from csvexport.actions import csvexport

# Register your models here.
from .models import *

from newsletter.models import (
    Newsletter, Subscription, Article, Message, Submission
)

from newsletter.admin import (
    SubscriptionAdmin
)

#admin.site.register(Product)
admin.site.register(Wohnprojekt)
admin.site.register(MobilitaetsProjekt)
admin.site.register(ErnaehrungsProjekt)
admin.site.register(EnergyProjekt)

# admin.site.register(Description)
admin.site.register(Media)
# admin.site.register(Link)
# admin.site.register(Credit)
class ContactAdmin(admin.ModelAdmin):
    actions = [csvexport]
    pass

admin.site.register(Contact, ContactAdmin)

class MSubscriptionAdmin(SubscriptionAdmin):
    actions = [csvexport]
    pass

admin.site.unregister(Subscription)
admin.site.register(Subscription, MSubscriptionAdmin)


class SearchAgentAdmin(admin.ModelAdmin):
    actions = [csvexport]
    # fields = ['email',]
    list_display = [ 'email']
    pass

admin.site.register(SearchAgent, SearchAgentAdmin)
# admin.site.register(Interaction)
# admin.site.register(Vote)
admin.site.register(Video)
# admin.site.register(Category)
