|
@ -3,12 +3,22 @@ from django.contrib import admin |
|
|
# Register your models here. |
|
|
# Register your models here. |
|
|
from .models import Project, HonoraryCertificate, Library, IFG #, ELitStip |
|
|
from .models import Project, HonoraryCertificate, Library, IFG #, ELitStip |
|
|
|
|
|
|
|
|
|
|
|
# @admin.register(Project) |
|
|
|
|
|
# class ProjectAdmin(admin.ModelAdmin): |
|
|
|
|
|
# #fields = ('pid',) |
|
|
|
|
|
# readonly_fields = ('pid',) |
|
|
|
|
|
# # list_display =('pid',) |
|
|
|
|
|
# def __init__(self, *args, **kwargs): |
|
|
|
|
|
# super().__init__(*args, **kwargs) |
|
|
|
|
|
# self.fields = super().get_all_field_names() + 'pid' |
|
|
|
|
|
# return self |
|
|
|
|
|
|
|
|
@admin.register(Project) |
|
|
@admin.register(Project) |
|
|
class ProjectAdmin(admin.ModelAdmin): |
|
|
class ProjectAdmin(admin.ModelAdmin): |
|
|
fields = ('pid',) |
|
|
|
|
|
readonly_fields = ('pid',) |
|
|
readonly_fields = ('pid',) |
|
|
|
|
|
|
|
|
admin.site.register([HonoraryCertificate, |
|
|
|
|
|
|
|
|
admin.site.register([ |
|
|
|
|
|
HonoraryCertificate, |
|
|
Library, |
|
|
Library, |
|
|
IFG, |
|
|
IFG, |
|
|
]) |
|
|
]) |