コード例 #1
0
ファイル: admin.py プロジェクト: aisapatino/sjfnw
            header.append("Question")
            header.append("Answer")
        writer.writerow(header)
        for row in response_rows:
            writer.writerow(row)

        return response


# -----------------------------------------------------------------------------
#  Register
# -----------------------------------------------------------------------------

admin.site.register(GivingProject, GivingProjectA)
admin.site.register(Member, MemberAdvanced)
admin.site.register(Membership, MembershipA)
admin.site.register(NewsItem, NewsA)
admin.site.register(Donor, DonorA)
admin.site.register(Resource, ResourceA)
admin.site.register(Survey, SurveyA)
admin.site.register(SurveyResponse, SurveyResponseA)

advanced_admin.register(Member, MemberAdvanced)
advanced_admin.register(Donor, DonorA)
advanced_admin.register(Membership, MembershipA)
advanced_admin.register(GivingProject, GivingProjectA)
advanced_admin.register(NewsItem, NewsA)
advanced_admin.register(Step, StepAdv)
advanced_admin.register(ProjectResource)
advanced_admin.register(Resource, ResourceA)
コード例 #2
0
ファイル: admin.py プロジェクト: aisapatino/sjfnw
    perms['unlisted'] = True
    return perms


class DraftAdv(BaseModelAdmin):
  """ Only used in admin-advanced """
  list_display = ['organization', 'grant_cycle', 'modified', 'overdue',
                  'extended_deadline']
  list_filter = ['grant_cycle']

# -----------------------------------------------------------------------------
#  REGISTER
# -----------------------------------------------------------------------------

admin.site.register(models.GrantCycle, GrantCycleA)
admin.site.register(models.Organization, OrganizationA)
admin.site.register(models.GrantApplication, GrantApplicationA)
admin.site.register(models.DraftGrantApplication, DraftGrantApplicationA)
admin.site.register(models.GivingProjectGrant, GivingProjectGrantA)
admin.site.register(models.SponsoredProgramGrant, SponsoredProgramGrantA)
admin.site.register(models.YearEndReport, YearEndReportA)
admin.site.register(models.YERDraft, YERDraftA)
admin.site.register(models.GrantApplicationLog, LogA)

advanced_admin.register(models.GrantCycle, GrantCycleA)
advanced_admin.register(models.Organization, OrganizationA)
advanced_admin.register(models.GrantApplication, GrantApplicationA)
advanced_admin.register(models.DraftGrantApplication, DraftAdv)
advanced_admin.register(models.GivingProjectGrant, GivingProjectGrantA)
advanced_admin.register(models.SponsoredProgramGrant, SponsoredProgramGrantA)