# Path: periods/models.py
# def today():
#     def timezone(self):
#     def first_days(self):
#     def cycle_count(self):
#     def get_previous_period(self, previous_to):
#     def get_next_period(self, after=None):
#     def get_cache_key(self, data_type):
#     def get_cycle_lengths(self):
#     def get_sorted_cycle_lengths(self):
#     def get_full_name(self):
#     def get_short_name(self):
#     def __str__(self):
#     def choices(cls, blank=False):
#     def __str__(self):
#     def _get_ordinal_value(self, index):
#     def cycle_length_minimum(self):
#     def cycle_length_maximum(self):
#     def _get_statistics_value(self, method_name, num_values_required=1):
#     def cycle_length_mean(self):
#     def cycle_length_median(self):
#     def cycle_length_mode(self):
#     def cycle_length_standard_deviation(self):
#     def current_cycle_length(self):
#     def first_date(self):
#     def first_day(self):
#     def set_start_date_and_day(self, min_timestamp):
#     def predicted_events(self):
#     def __str__(self):
#     def get_from_server(from_date):
#     def get_for_date(cls, from_date, to_date):
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def add_to_permissions_group(sender, instance, **kwargs):
# def create_statistics(sender, instance, **kwargs):
# def update_statistics(sender, instance, **kwargs):
# class User(AbstractEmailUser):
# class LabelChoicesEnum(enum.Enum):
# class FlowLevel(LabelChoicesEnum):
# class FlowColor(LabelChoicesEnum):
# class ClotSize(LabelChoicesEnum):
# class CrampLevel(LabelChoicesEnum):
# class FlowEvent(models.Model):
# class Statistics(models.Model):
#     class Meta:
# class AerisData(models.Model):
#     SPOTTING = 0
#     LIGHT = 1
#     MEDIUM = 2
#     HEAVY = 3
#     VERY_HEAVY = 4
#     PINK = 0
#     LIGHT_RED = 1
#     RED = 2
#     DARK_RED = 3
#     BROWN = 4
#     BLACK = 5
#     SMALL = 0
#     MEDIUM = 1
#     LARGE = 2
#     SLIGHT = 0
#     MODERATE = 1
#     SEVERE = 2


from custom_user.admin import EmailUserAdmin
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_lazy as _
from periods import models

    list_display = ['user', 'timestamp', 'first_day', 'level', 'color', 'clots', 'cramps']
    list_filter = ['timestamp', 'first_day', 'level', 'color', 'clots', 'cramps']
    search_fields = ['user__email', 'user__first_name', 'user__last_name', 'timestamp', 'level',
                     'color', 'clots', 'cramps', 'comment']


class StatisticsAdmin(admin.ModelAdmin):

    list_display = ['__str__', 'average_cycle_length']
    search_fields = ['user__email', 'user__first_name', 'user__last_name']


class UserAdmin(EmailUserAdmin):

    list_display = ['email', 'first_name', 'last_name', 'cycle_count', 'date_joined', 'is_active',
                    'send_emails']
    fieldsets = (
        (None, {'fields': ('first_name', 'last_name', 'email', 'password')}),
        (_('Settings'), {'fields': ('_timezone', 'send_emails', 'luteal_phase_length',
                                    'birth_date')}),
        (_('General Information'), {'fields': ('last_login', 'date_joined', 'cycle_count')}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser',
                                       'groups', 'user_permissions')}),
    )
    search_fields = ['email', 'first_name', 'last_name']
    readonly_fields = ['cycle_count']


admin.site.register(models.FlowEvent, FlowAdmin)

# Path: periods/models.py
# def today():
#     def timezone(self):
#     def first_days(self):
#     def cycle_count(self):
#     def get_previous_period(self, previous_to):
#     def get_next_period(self, after=None):
#     def get_cache_key(self, data_type):
#     def get_cycle_lengths(self):
#     def get_sorted_cycle_lengths(self):
#     def get_full_name(self):
#     def get_short_name(self):
#     def __str__(self):
#     def choices(cls, blank=False):
#     def __str__(self):
#     def _get_ordinal_value(self, index):
#     def cycle_length_minimum(self):
#     def cycle_length_maximum(self):
#     def _get_statistics_value(self, method_name, num_values_required=1):
#     def cycle_length_mean(self):
#     def cycle_length_median(self):
#     def cycle_length_mode(self):
#     def cycle_length_standard_deviation(self):
#     def current_cycle_length(self):
#     def first_date(self):
#     def first_day(self):
#     def set_start_date_and_day(self, min_timestamp):
#     def predicted_events(self):
#     def __str__(self):
#     def get_from_server(from_date):
#     def get_for_date(cls, from_date, to_date):
# def create_auth_token(sender, instance=None, created=False, **kwargs):
# def add_to_permissions_group(sender, instance, **kwargs):
# def create_statistics(sender, instance, **kwargs):
# def update_statistics(sender, instance, **kwargs):
# class User(AbstractEmailUser):
# class LabelChoicesEnum(enum.Enum):
# class FlowLevel(LabelChoicesEnum):
# class FlowColor(LabelChoicesEnum):
# class ClotSize(LabelChoicesEnum):
# class CrampLevel(LabelChoicesEnum):
# class FlowEvent(models.Model):
# class Statistics(models.Model):
#     class Meta:
# class AerisData(models.Model):
#     SPOTTING = 0
#     LIGHT = 1
#     MEDIUM = 2
#     HEAVY = 3
#     VERY_HEAVY = 4
#     PINK = 0
#     LIGHT_RED = 1
#     RED = 2
#     DARK_RED = 3
#     BROWN = 4
#     BLACK = 5
#     SMALL = 0
#     MEDIUM = 1
#     LARGE = 2
#     SLIGHT = 0
#     MODERATE = 1
#     SEVERE = 2


# Path: periods/admin.py
from custom_user.admin import EmailUserAdmin
from django.contrib import admin
from django.contrib.auth import get_user_model
from django.utils.translation import ugettext_lazy as _
from periods import models


    list_display = ['user', 'timestamp', 'first_day', 'level', 'color', 'clots', 'cramps']
    list_filter = ['timestamp', 'first_day', 'level', 'color', 'clots', 'cramps']
    search_fields = ['user__email', 'user__first_name', 'user__last_name', 'timestamp', 'level',
                     'color', 'clots', 'cramps', 'comment']


class StatisticsAdmin(admin.ModelAdmin):

    list_display = ['__str__', 'average_cycle_length']
    search_fields = ['user__email', 'user__first_name', 'user__last_name']


class UserAdmin(EmailUserAdmin):

    list_display = ['email', 'first_name', 'last_name', 'cycle_count', 'date_joined', 'is_active',
                    'send_emails']
    fieldsets = (
        (None, {'fields': ('first_name', 'last_name', 'email', 'password')}),
        (_('Settings'), {'fields': ('_timezone', 'send_emails', 'luteal_phase_length',
                                    'birth_date')}),
        (_('General Information'), {'fields': ('last_login', 'date_joined', 'cycle_count')}),
        (_('Permissions'), {'fields': ('is_active', 'is_staff', 'is_superuser',
                                       'groups', 'user_permissions')}),
    )
    search_fields = ['email', 'first_name', 'last_name']
    readonly_fields = ['cycle_count']


admin.site.register(models.FlowEvent, FlowAdmin)

admin.site.register(models.Statistics, StatisticsAdmin)