Commit 6466fb1e authored by Joseph Izon's avatar Joseph Izon 💀

Created model named WidgetUser for Homepage

parent ae8a6f4d
No preview for this file type
from django.contrib import admin
# Register your models here.
from .models import WidgetUser
class WidgetUserAdmin(admin.ModelAdmin):
model = WidgetUser
search_fields = ('first_name', 'last_name',)
list_display = ('first_name', 'middle_name', 'last_name',)
list_filter = ('first_name', 'middle_name', 'last_name',)
admin.site.register(WidgetUser, WidgetUserAdmin)
from django.db import models
# Create your models here.
class WidgetUser(models.Model):
first_name = models.CharField(max_length=50)
middle_name = models.CharField(max_length=50)
last_name = models.CharField(max_length=50)
def __str__(self):
return self.last_name
\ No newline at end of file
......@@ -38,6 +38,7 @@ ALLOWED_HOSTS = []
INSTALLED_APPS = [
'announcements.apps.AnnouncementsConfig',
'assignments.apps.AssignmentsConfig',
'homepage.apps.HomepageConfig',
'django.contrib.admin',
'django.contrib.auth',
'django.contrib.contenttypes',
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment