Vote count:
0
For the Admin interface in Django, I have a class called RideInfo set with attributes. I have another class called Rider that is related to RideInfo via foreign key. It is a 1 - Many relationship between RideInfo and Ride. Admin.py looks like the following:
from django.contrib.gis import admin
from django.contrib.gis.admin import OSMGeoAdmin
from models import Bike, RideInfo, Rider
class BikeInline(admin.TabularInline):
model = RideInfo
extra = 0
class BikeAdmin(OSMGeoAdmin):
inlines = [BikeInline]
admin.site.register(Bike,BikeAdmin)
How do I show the fields from Rider in the Admin interface?
asked 46 secs ago
Django Admin, showing related tables fields
Aucun commentaire:
Enregistrer un commentaire