On Apr 19, 2:07 am, nulvinge <ulvi...@gmail.com> wrote: > I managed to solve it. > > part of my model was: > class Hour(models.Model): > store = models.ForeignKey('Store', unique=True) > > And it shouldn't have been unique. > Hmm, maybe there should be some warning message to clarify this or > atleast document it, > because I have searched a lot of docs to find what the problem was. It > was only thru debugging > the program that I found the code in the inlinfesformset_factory. > > On Apr 19, 1:27 am, nulvinge <ulvi...@gmail.com> wrote: > > > > > Since this thing seems to be under some development now I should maybe > > say that I'm > > using the debian python-django package version 1.1.1-5. > > > On Apr 19, 1:21 am, nulvinge <ulvi...@gmail.com> wrote: > > > > I simply can't get the extra field of inlining to work with the admin > > > interface. > > > Whatever I do the admin interface only shows one row of Hour > > > Here's my admin.py: > > > > from gshop.gs.models import (Store, Brand, District, Category, Hour) > > > from django.contrib.gis import admin > > > > class MyGeoAdmin(admin.OSMGeoAdmin): > > > default_lon = 1331500 > > > default_lat = 7904900 > > > default_zoom = 14 > > > > class HourInline(admin.TabularInline): > > > model = Hour > > > max_num = 7 > > > extra = 3 > > > > class MyStoreAdmin(MyGeoAdmin): > > > inlines = [HourInline] > > > > admin.site.register(Store, MyStoreAdmin) > > > admin.site.register(District, MyGeoAdmin) > > > admin.site.register(Brand) > > > admin.site.register(Category) > > > admin.site.register(Hour) > I am curious about this because I have also sometimes had this problem; but I have so much to develop that I have not spent lots of time trying to track down each occurrence.
When you say " it shouldn't have been unique" - do you mean "it cannot be unique because that is a faulty model definition" or "it cannot be unique because this type of model definition will prevent inlines displaying"? If the former, then I am not sure that Django can really help. Its almost impossible to think of every possible error that users can make and report on this. If the latter, then that is worrying as it implies there is limited usage for inlines. Thanks Derek -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-us...@googlegroups.com. To unsubscribe from this group, send email to django-users+unsubscr...@googlegroups.com. For more options, visit this group at http://groups.google.com/group/django-users?hl=en.