Admin documentation

Gestion app admin

class gestion.admin.ConsumptionAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('customer', 'product', 'quantity')
media
ordering = ('-quantity',)
search_fields = ('customer', 'product')
class gestion.admin.ConsumptionHistoryAdmin(model, admin_site)

The admin class for Consumption Histories.

list_display = ('customer', 'product', 'quantity', 'paymentMethod', 'date', 'amount')
list_filter = ('paymentMethod',)
media
ordering = ('-date',)
search_fields = ('customer', 'product')
class gestion.admin.KegAdmin(model, admin_site)

The admin class for Kegs.

list_display = ('name', 'stockHold', 'capacity', 'is_active')
list_filter = ('capacity', 'is_active')
media
ordering = ('name',)
search_fields = ('name',)
class gestion.admin.KegHistoryAdmin(model, admin_site)

The admin class for Keg Histories.

list_display = ('keg', 'openingDate', 'closingDate', 'isCurrentKegHistory', 'quantitySold')
list_filter = ('isCurrentKegHistory', 'keg')
media
ordering = ('-openingDate', 'quantitySold')
search_fields = ('keg',)
class gestion.admin.MenuAdmin(model, admin_site)

The admin class for Menu.

list_display = ('name', 'amount', 'is_active')
list_filter = ('is_active',)
media
ordering = ('name', 'amount')
search_fields = ('name',)
class gestion.admin.MenuHistoryAdmin(model, admin_site)

The admin class for Menu Histories.

list_display = ('customer', 'menu', 'paymentMethod', 'date', 'quantity', 'amount')
media
ordering = ('-date',)
search_fields = ('customer', 'menu')
class gestion.admin.ProductAdmin(model, admin_site)

The admin class for Products.

list_display = ('name', 'amount', 'is_active', 'category', 'adherentRequired', 'stockHold', 'stockBar', 'volume', 'deg')
list_filter = ('is_active', 'adherentRequired', 'category')
media
ordering = ('name', 'amount', 'stockHold', 'stockBar', 'deg')
search_fields = ('name',)
class gestion.admin.RefundAdmin(model, admin_site)

The admin class for Refunds.

list_display = ('customer', 'amount', 'date')
media
ordering = ('-date', 'amount', 'customer')
search_fields = ('customer',)
class gestion.admin.ReloadAdmin(model, admin_site)

The admin class for Reloads.

list_display = ('customer', 'amount', 'date', 'PaymentMethod')
list_filter = ('PaymentMethod',)
media
ordering = ('-date', 'amount', 'customer')
search_fields = ('customer',)

Users app admin

class users.admin.BalanceFilter(request, params, model, model_admin)

A filter which filters according to the sign of the balance

lookups(request, model_admin)

Must be overridden to return a list of tuples (value, verbose value)

parameter_name = 'solde'
queryset(request, queryset)

Return the filtered queryset.

title = 'Solde'
class users.admin.CotisationHistoryAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('user', 'amount', 'duration', 'paymentDate', 'endDate', 'paymentMethod')
list_filter = ('paymentMethod',)
media
ordering = ('user', 'amount', 'duration', 'paymentDate', 'endDate')
search_fields = ('user',)
class users.admin.ProfileAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('user', 'credit', 'debit', 'balance', 'school', 'cotisationEnd', 'is_adherent')
list_filter = ('school', <class 'users.admin.BalanceFilter'>)
media
ordering = ('user', '-credit', '-debit')
search_fields = ('user',)
class users.admin.WhiteListHistoryAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('user', 'paymentDate', 'endDate', 'duration')
media
ordering = ('user', 'duration', 'paymentDate', 'endDate')
search_fields = ('user',)

Preferences app admin

class preferences.admin.CotisationAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('__str__', 'amount', 'duration')
media
ordering = ('-duration', '-amount')
class preferences.admin.GeneralPreferencesAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('is_active', 'president', 'vice_president', 'treasurer', 'secretary', 'brewer', 'grocer', 'use_pinte_monitoring', 'lost_pintes_allowed', 'floating_buttons', 'automatic_logout_time')
media
class preferences.admin.PaymentMethodAdmin(model, admin_site)

The admin class for Consumptions.

list_display = ('name', 'is_active', 'is_usable_in_cotisation', 'is_usable_in_reload', 'affect_balance')
list_filter = ('is_active', 'is_usable_in_cotisation', 'is_usable_in_reload', 'affect_balance')
media
ordering = ('name',)
search_fields = ('name',)