Django Users,

I am working through polls tutorial part 2 that enhances the admin page. 
 Note that I did search for a solution in the recommended places but while 
I saw similar complaints, none seemed to match exactly.
 
In poll tutorial 2 it says "At the end of the three current slots you will 
find an “Add another Choice” link."  But this is not the case in Chrome.

If I view source in Chrome I see this function but the addText does not 
appear.  (I am on the latest Chrome: Version 39.0.2171.71 (64-bit))  This 
is in the source:

<script type="text/javascript">

(function($) {
$("#choice_set-group .tabular.inline-related tbody tr").tabularFormset({
prefix: "choice_set",
adminStaticPrefix: '/static/admin/',
addText: "Add another Choice",
deleteText: "Remove"
});
})(django.jQuery);
</script>




For the heck of it I gave it a try in Safari and it rendered just fine.

Here is my code in admin.py:

from django.contrib import admin
from polls.models import Question, Choice

class ChoiceInline(admin.TabularInline):
    model = Choice
    extra = 3

class QuestionAdmin(admin.ModelAdmin):
    fieldsets = [
        (None,               {'fields': ['question_text']}),
        ('Date information', {'fields': ['pub_date'], 'classes': 
['collapse']}),
    ]
    inlines = [ChoiceInline]

admin.site.register(Question, QuestionAdmin)

Any thoughts or is this a known issue?

Thanks,
Tim






 

-- 
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/6a88fb07-785e-48b8-85df-3b4ed4b14088%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to