Commit 098ea0d3 authored by Laurent Peuch's avatar Laurent Peuch
Browse files

Merge pull request #5 from tbalthazar/django-admin-views

Move accounting links into the Accounts section
parents 8f51ea0f 10895985
# encoding: utf-8
from django.contrib import admin
from django.conf.locale.en import formats as en_formats
from reversion.admin import VersionAdmin
from admin_views.admin import AdminViews
from .models import Movement
en_formats.DATE_FORMAT = "Y-m-d"
class MovementAdmin(VersionAdmin):
class MovementAdmin(VersionAdmin, AdminViews):
fieldsets = (
(None, {
"fields": (("date", "amount"), ("title", "kind"), ("comment",), ("bank_id",))
......@@ -41,4 +39,9 @@ class MovementAdmin(VersionAdmin):
title_column.short_description = "Title"
admin_views = (
('Neutrinet Public Accounting Page', '/accounts'),
('Upload Record Bank CSV ', '/accounts/upload_record_bank_csv'),
)
admin.site.register(Movement, MovementAdmin)
......@@ -2,7 +2,6 @@
import reversion
from django.contrib import admin
from admin_views.admin import AdminViews
from .models import Member
......@@ -24,7 +23,7 @@ class IsStillMember(admin.SimpleListFilter):
return queryset.filter(member_end__isnull=False)
class MemberAdmin(reversion.VersionAdmin, AdminViews):
class MemberAdmin(reversion.VersionAdmin):
list_display = ('first_name', 'last_name', 'last_paid_date', 'email', 'vpn', 'cube', 'is_not_a_member_yet')
list_filter = ('last_paid_date', 'ca_member', IsStillMember, 'vpn', 'cube', 'is_not_a_member_yet')
radio_fields = {"juridical_form": admin.HORIZONTAL}
......@@ -48,10 +47,4 @@ class MemberAdmin(reversion.VersionAdmin, AdminViews):
}),
)
admin_views = (
('Neutrinet Public Accounting Page', '/accounts'),
('Upload Record Bank CSV ', '/accounts/upload_record_bank_csv'),
)
admin.site.register(Member, MemberAdmin)
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment