# Path: profiles/modules/notifications/models.py
# class Notification(Orderable):
#     """
#     Patient notification methods (e.g. Email, Mobile,)
#     """
# 
#     name = models.CharField(max_length=150)
#     slug = models.SlugField(max_length=150)
#     field_name = models.CharField(max_length=31, null=True, blank=True, 
#                                   choices=ProfileFieldsChoices(),
#                                   help_text=_('Name of the Profile field required for this notification.'))
#    
#     class Meta:
#         app_label = 'profiles'
#         ordering = ('sort_order',)
#    
#     def __unicode__(self):
#         return self.name


from django.contrib import admin
from orderable.admin import OrderableAdmin
from .models import Notification




class NotificationOptions(OrderableAdmin):
    prepopulated_fields = {'slug': ('name',)}
    fields = ('name', 'slug', 'field_name', )
    list_display = ('name', 'slug', 'field_name', 'sort_order_display')

# Path: profiles/modules/notifications/models.py
# class Notification(Orderable):
#     """
#     Patient notification methods (e.g. Email, Mobile,)
#     """
# 
#     name = models.CharField(max_length=150)
#     slug = models.SlugField(max_length=150)
#     field_name = models.CharField(max_length=31, null=True, blank=True, 
#                                   choices=ProfileFieldsChoices(),
#                                   help_text=_('Name of the Profile field required for this notification.'))
#    
#     class Meta:
#         app_label = 'profiles'
#         ordering = ('sort_order',)
#    
#     def __unicode__(self):
#         return self.name


# Path: profiles/modules/notifications/admin.py
from django.contrib import admin
from orderable.admin import OrderableAdmin
from .models import Notification





class NotificationOptions(OrderableAdmin):
    prepopulated_fields = {'slug': ('name',)}
    fields = ('name', 'slug', 'field_name', )
    list_display = ('name', 'slug', 'field_name', 'sort_order_display')

    search_fields = ('name', )