Skip to content

Instantly share code, notes, and snippets.

@Allwin12
Created June 3, 2021 18:27
Show Gist options
  • Save Allwin12/83822b33074bc055665cc9f586d438b2 to your computer and use it in GitHub Desktop.
Save Allwin12/83822b33074bc055665cc9f586d438b2 to your computer and use it in GitHub Desktop.
from django.contrib import admin
from app.models import Student
class StudentAdmin(admin.ModelAdmin):
model = Student
fieldsets = [
('Personal Information', {'fields': ['name', 'address', 'date_of_birth']}),
('Education', {'fields': ['school_name', 'college_name']}),
('Professional Information', {'fields': ['current_job', 'company_name']})
]
admin.site.register(Student, StudentAdmin)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment