Example #1
0
    search_fields = ('type', 'name')


class ActivityNomenclatureAdmin(MPTTModelAdmin, FkAutocompleteAdmin):

    related_search_fields = {'avise': ('label',), 'parent': ('path',)}
    mptt_indent_field = 'label'
    mptt_level_indent = 50
    list_display = ('label', )


class PersonAdmin(BasePersonAdmin):
    inlines = [ContactInline, OrgInline]


admin.site.unregister(Organization)
register(Guaranty, GuarantyAdmin)
register(Organization, OrganizationAdmin)
register(ActivityNomenclature, ActivityNomenclatureAdmin)
register(ActivityNomenclatureAvise)
register(ClientTarget)
register(TransverseTheme)
register(AgreementIAE)
register(Contact)
register(LegalStatus)
register(CategoryIAE)
register(DocumentType)
register(ContactMedium)
admin.site.unregister(Person)
register(Person, PersonAdmin)
Example #2
0
# -*- coding:utf-8 -*-

from django.contrib import admin
from coop.utils.autocomplete_admin import register
from coop_local.models import *
from coop.person.admin import PersonAdmin
from coop.org.admin import OrganizationAdmin
from coop.prefs.admin import SitePrefsAdmin
from coop_geo.admin import LocationAdmin, AreaAdmin
from django.conf import settings

# -- Loading base models

register(LinkProperty)
register(Link)
register(Role)
register(PersonCategory)
register(Person, PersonAdmin)
register(Organization, OrganizationAdmin)
register(OrganizationCategory)
register(OrgRelationType)
register(SitePrefs, SitePrefsAdmin)
register(Location, LocationAdmin)
register(Area, AreaAdmin)

if "coop.project" in settings.INSTALLED_APPS:
    from coop.project.admin import ProjectAdmin

    admin.site.register(Project, ProjectAdmin)
    admin.site.register(ProjectCategory)
Example #3
0

class OfferAdmin(FkAutocompleteAdmin):

    list_display = ('provider', 'activities')
    search_fields = ('activity__label', 'provider__title', 'provider__acronym')
    related_search_fields = {
        'provider': (
            'title',
            'acronym',
        ),
    }
    inlines = [OActivityInline, OfferAreaInline, OfferDocumentInline]
    exclude = ('activity', 'area')


admin.site.unregister(Organization)
register(Guaranty, GuarantyAdmin)
register(Organization, OrganizationAdmin)
register(ClientTarget)
register(AgreementIAE)
register(Contact)
register(LegalStatus)
register(CategoryIAE)
register(DocumentType)
register(ContactMedium)
admin.site.unregister(Person)
register(Person, PersonAdmin)
register(CallForTenders, CallForTendersAdmin)
register(Offer, OfferAdmin)
Example #4
0
    related_search_fields = {'area': ('label', ), }
    verbose_name = u'Couverture géographique'
    verbose_name_plural = u'Couverture géographique'


class OfferAdmin(FkAutocompleteAdmin):

    list_display = ('provider', 'activities')
    search_fields = ('activity__label', 'provider__title', 'provider__acronym')
    related_search_fields = {
        'provider': ('title', 'acronym', ),
    }
    inlines = [OActivityInline, OfferAreaInline, OfferDocumentInline]
    exclude = ('activity', 'area')


admin.site.unregister(Organization)
register(Guaranty, GuarantyAdmin)
register(Organization, OrganizationAdmin)
register(ClientTarget)
register(AgreementIAE)
register(Contact)
register(LegalStatus)
register(CategoryIAE)
register(DocumentType)
register(ContactMedium)
admin.site.unregister(Person)
register(Person, PersonAdmin)
register(CallForTenders, CallForTendersAdmin)
register(Offer, OfferAdmin)