Ticket #8886: models.py
File models.py, 452 bytes (added by , 16 years ago) |
---|
Line | |
---|---|
1 | from django.db import models |
2 | from django.contrib.auth.models import User |
3 | from django.contrib import admin |
4 | |
5 | class Employee(User): |
6 | """ |
7 | This class defines an Employee based on User |
8 | """ |
9 | title=models.CharField('Title', max_length=200) |
10 | is_active=models.BooleanField('Is Active', default=True) |
11 | |
12 | class Meta: |
13 | pass |
14 | |
15 | class EmployeeAdmin(admin.ModelAdmin): |
16 | pass |
17 | admin.site.register(Employee, EmployeeAdmin) |
18 |