Re: I nedd help - first Django app, part 2 - Admin - Adding related objects
as usual... Thank you Ramiro for your effort W dniu poniedziałek, 27 stycznia 2014 14:14:14 UTC+1 użytkownik Ramiro Morales napisał: > > On Mon, Jan 27, 2014 at 7:54 AM, Rafał Szymański >> wrote: > > Hello everybody. > > I'm Rafał. I just started learnig and I'd like to ask You for little > help. > > I'm in the part 2 of tutorial - admin, Adding related objects. > > I have no three slots for related Choices. > > Here is my code. > > [snip] > > class PollAdmin(admin.ModelAdmin): > > ... > > inline = [ChoiceInline] > > The correct option name here is 'inlines': > > inlines = [ChoiceInline] > > -- > Ramiro Morales > @ramiromorales > -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/30d66915-407d-4d9d-9768-abefda839c0c%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.
Re: I nedd help - first Django app, part 2 - Admin - Adding related objects
On Mon, Jan 27, 2014 at 7:54 AM, Rafał Szymańskiwrote: > Hello everybody. > I'm Rafał. I just started learnig and I'd like to ask You for little help. > I'm in the part 2 of tutorial - admin, Adding related objects. > I have no three slots for related Choices. > Here is my code. > [snip] > class PollAdmin(admin.ModelAdmin): > ... > inline = [ChoiceInline] The correct option name here is 'inlines': inlines = [ChoiceInline] -- Ramiro Morales @ramiromorales -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/CAO7PdF-uyJAXa3mshH9nF5ptNkdCHUosD1PfK2GS%3Dtu8Eo9nuQ%40mail.gmail.com. For more options, visit https://groups.google.com/groups/opt_out.
I nedd help - first Django app, part 2 - Admin - Adding related objects
Hello everybody. I'm Rafał. I just started learnig and I'd like to ask You for little help. I'm in the part 2 of tutorial - admin, Adding related objects. I have no three slots for related Choices. Here is my code. Thanks in advance for any help. from django.contrib import admin from polls.models import Choice, Poll class ChoiceInline(admin.StackedInline): model = Choice extra = 3 class PollAdmin(admin.ModelAdmin): fieldsets = [ (None, {'fields': ['question']}), ('Date information', {'fields': ['pub_date'], 'classes': ['collapse']}), ] inline = [ChoiceInline] list_display = ('question', 'pub_date', 'was_published_recently') admin.site.register(Poll, PollAdmin) -- You received this message because you are subscribed to the Google Groups "Django users" group. To unsubscribe from this group and stop receiving emails from it, send an email to django-users+unsubscr...@googlegroups.com. To post to this group, send email to django-users@googlegroups.com. Visit this group at http://groups.google.com/group/django-users. To view this discussion on the web visit https://groups.google.com/d/msgid/django-users/ebe4c00a-8e9d-4337-8d6d-0f51861f78b2%40googlegroups.com. For more options, visit https://groups.google.com/groups/opt_out.