Created
January 28, 2012 11:33
-
-
Save debuggerpk/1694018 to your computer and use it in GitHub Desktop.
admin.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
__author__ = 'yousuf' | |
from League.models import Leagues | |
from League.models import Team | |
from django.contrib import admin | |
class TeamsInLeague(admin.StackedInline): | |
model = Team | |
extra = 1 | |
class LeagueAdmin(admin.ModelAdmin): | |
fields = ['LeagueName'] | |
inlines = [TeamsInLeague] | |
admin.site.register(Leagues,LeagueAdmin) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment