Statistics
| Branch: | Revision:

root / crm / robocrm / admin.py @ 7646a522

History | View | Annotate | Download (672 Bytes)

1
from robocrm.models import Machine
2
from robocrm.models import Event
3
from robocrm.models import Project
4
from robocrm.models import RoboResource
5
from django.contrib import admin
6
from django.contrib.auth.admin import UserAdmin
7
from django.contrib.auth.models import User
8
from robocrm.models import RoboUser
9

    
10
class UserProfileInLine(admin.StackedInline):
11
  model = RoboUser
12
  can_delete=False
13
  verbose_name_plural = 'profile'
14

    
15
class UserAdmin(UserAdmin):
16
  inlines = (UserProfileInLine, )
17

    
18
admin.site.unregister(User)
19
admin.site.register(User, UserAdmin)
20
admin.site.register(Machine)
21
admin.site.register(Event)
22
admin.site.register(Project)
23
admin.site.register(RoboResource)
24