# Path: memopol/mps/models.py
# class Function(models.Model):
# class Department(models.Model):
# class Circonscription(models.Model):
# class Canton(models.Model):
# class Group(models.Model):
# class MP(Representative):
# class FunctionMP(models.Model):
# class Address(models.Model):
# class Phone(models.Model):
# class Mandate(models.Model):
#     def __unicode__(self):
#     def count(self):
#     def mps(self):
#     def q_objects(self):
#     def with_mps_count(cls):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def count(self):
#     def mps(self):
#     def q_objects(self):
#     def with_mps_count(cls):
#     def __unicode__(self):
#     def get_absolute_url(self):
#     def scores(self):
#     def total_score(self):
#     def optimized_phones(self):
#     def phones(self):
#     def __unicode__(self):


from django.contrib import admin
from memopol.mps import models


class FunctionMP(admin.TabularInline):
    model = models.FunctionMP
    extra = 1

class Address(admin.TabularInline):
    model = models.Address
    extra = 1

class Mandate(admin.TabularInline):
    model = models.Mandate
    extra = 1


class MP(admin.ModelAdmin):
    search_fields = ['last_name']
    list_display = ['last_name', 'first_name', 'department', 'group']
    list_filter = ['group', 'department']
    inlines = [Address, FunctionMP, Mandate]

admin.site.register(models.MP, MP)

class Canton(admin.TabularInline):
    model = models.Canton
    extra = 1

class CirconscriptionAdmin(admin.ModelAdmin):
    inlines = [Canton]


# Path: memopol/mps/models.py
# class Function(models.Model):
# class Department(models.Model):
# class Circonscription(models.Model):
# class Canton(models.Model):
# class Group(models.Model):
# class MP(Representative):
# class FunctionMP(models.Model):
# class Address(models.Model):
# class Phone(models.Model):
# class Mandate(models.Model):
#     def __unicode__(self):
#     def count(self):
#     def mps(self):
#     def q_objects(self):
#     def with_mps_count(cls):
#     def __unicode__(self):
#     def __unicode__(self):
#     def __unicode__(self):
#     def count(self):
#     def mps(self):
#     def q_objects(self):
#     def with_mps_count(cls):
#     def __unicode__(self):
#     def get_absolute_url(self):
#     def scores(self):
#     def total_score(self):
#     def optimized_phones(self):
#     def phones(self):
#     def __unicode__(self):


# Path: memopol/mps/admin.py
from django.contrib import admin
from memopol.mps import models



class FunctionMP(admin.TabularInline):
    model = models.FunctionMP
    extra = 1

class Address(admin.TabularInline):
    model = models.Address
    extra = 1

class Mandate(admin.TabularInline):
    model = models.Mandate
    extra = 1


class MP(admin.ModelAdmin):
    search_fields = ['last_name']
    list_display = ['last_name', 'first_name', 'department', 'group']
    list_filter = ['group', 'department']
    inlines = [Address, FunctionMP, Mandate]

admin.site.register(models.MP, MP)

class Canton(admin.TabularInline):
    model = models.Canton
    extra = 1

class CirconscriptionAdmin(admin.ModelAdmin):
    inlines = [Canton]


admin.site.register(models.Circonscription, CirconscriptionAdmin)