generated from 2martens/django-template
Renamed app and Django template
This commit is contained in:
21
food_planner/admin.py
Normal file
21
food_planner/admin.py
Normal file
@ -0,0 +1,21 @@
|
||||
# coding=utf-8
|
||||
from django.contrib import admin
|
||||
from django.contrib.auth.admin import UserAdmin
|
||||
from django.contrib.auth.models import User
|
||||
|
||||
from food_planner.models import Profile
|
||||
|
||||
# Register your models here.
|
||||
admin.site.unregister(User)
|
||||
|
||||
|
||||
class ProfileInline(admin.StackedInline):
|
||||
model = Profile
|
||||
|
||||
|
||||
class UserProfileAdmin(UserAdmin):
|
||||
inlines = [ProfileInline, ]
|
||||
|
||||
|
||||
admin.site.register(User, UserProfileAdmin)
|
||||
|
||||
Reference in New Issue
Block a user