Example #1
0
    def save_model(self, request, obj, form, change):
        MultiDBModelAdmin.save_model(self, request, obj, form, change)

        if not change:
            hep_post = PostInfo.objects.using(self.using).create(
                    post=obj.id,
                    pub_date=obj.pub_date)
            hep_post.save(using=self.using)
Example #2
0
    def save_model(self, request, obj, form, change):
        MultiDBModelAdmin.save_model(self, request, obj, form, change)

        if not change:
            hep_member = PersonInfo.objects.using(self.using).create(
                    person=obj.id,
                    kind='AL',
                    position='alumni')
            hep_member.save(using=self.using)
Example #3
0
    def get_actions(self, request):
        ''' Disable entry delete from DB '''

        actions = MultiDBModelAdmin.get_actions(self, request)
        del actions['delete_selected']

        return actions
Example #4
0
    def __init__(self, *parg, **karg):
        MultiDBModelAdmin.__init__(self, *parg, **karg)

        self.list_display_links = (None, )  # disable news edit
        self.__physics_posts = None
Example #5
0
    def get_actions(self, request):
        actions = MultiDBModelAdmin.get_actions(self, request)
        del actions['delete_selected']

        return actions
Example #6
0
    def __init__(self, *parg, **karg):
        MultiDBModelAdmin.__init__(self, *parg, **karg)

        self.list_display_links = (None, ) # disable person edit
        self.__hep_members = None