from django.contrib import admin
from django.contrib.auth.admin import UserAdmin
from django.contrib.auth.models import User

from django_tablib.admin import TablibAdmin

from jazzpos.models import Customer, Patient, Store, CustomerType, StoreSettings
from jazzpos.models import UserProfile

class CustomerAdmin(TablibAdmin):
    formats = ['xls', 'csv',]

class PatientAdmin(TablibAdmin):
    formats = ['xls', 'csv',]

class StoreAdmin(admin.ModelAdmin):
    pass

class StoreSettingsAdmin(admin.ModelAdmin):
    pass

class CustomerTypeAdmin(admin.ModelAdmin):
    pass

class UserProfileInline(admin.StackedInline):
    model = UserProfile

UserAdmin.inlines = [UserProfileInline,]

admin.site.register(Customer, CustomerAdmin)
admin.site.register(Patient, PatientAdmin)
admin.site.register(Store, StoreAdmin)
admin.site.register(StoreSettings, StoreSettingsAdmin)
admin.site.register(CustomerType, CustomerTypeAdmin)

admin.site.unregister(User)
admin.site.register(User, UserAdmin)

[((30, 0, 30, 44), 'django.contrib.admin.site.register', 'admin.site.register', ({(30, 20, 30, 28): 'Customer', (30, 30, 30, 43): 'CustomerAdmin'}, {}), '(Customer, CustomerAdmin)', False, 'from django.contrib import admin\n'), ((31, 0, 31, 42), 'django.contrib.admin.site.register', 'admin.site.register', ({(31, 20, 31, 27): 'Patient', (31, 29, 31, 41): 'PatientAdmin'}, {}), '(Patient, PatientAdmin)', False, 'from django.contrib import admin\n'), ((32, 0, 32, 38), 'django.contrib.admin.site.register', 'admin.site.register', ({(32, 20, 32, 25): 'Store', (32, 27, 32, 37): 'StoreAdmin'}, {}), '(Store, StoreAdmin)', False, 'from django.contrib import admin\n'), ((33, 0, 33, 54), 'django.contrib.admin.site.register', 'admin.site.register', ({(33, 20, 33, 33): 'StoreSettings', (33, 35, 33, 53): 'StoreSettingsAdmin'}, {}), '(StoreSettings, StoreSettingsAdmin)', False, 'from django.contrib import admin\n'), ((34, 0, 34, 52), 'django.contrib.admin.site.register', 'admin.site.register', ({(34, 20, 34, 32): 'CustomerType', (34, 34, 34, 51): 'CustomerTypeAdmin'}, {}), '(CustomerType, CustomerTypeAdmin)', False, 'from django.contrib import admin\n'), ((36, 0, 36, 27), 'django.contrib.admin.site.unregister', 'admin.site.unregister', ({(36, 22, 36, 26): 'User'}, {}), '(User)', False, 'from django.contrib import admin\n'), ((37, 0, 37, 36), 'django.contrib.admin.site.register', 'admin.site.register', ({(37, 20, 37, 24): 'User', (37, 26, 37, 35): 'UserAdmin'}, {}), '(User, UserAdmin)', False, 'from django.contrib import admin\n')]