Add another link missing in Chrome

42 views
Skip to first unread message

Timothy Good

unread,
Dec 5, 2014, 11:19:37 AM12/5/14
to django...@googlegroups.com
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






 

Timothy Good

unread,
Dec 6, 2014, 7:51:27 AM12/6/14
to django...@googlegroups.com
Here is the heart of my question:  Is basic Django code (like in the poll tutoiral) supposed to render the same in different browsers? If the answer is 'Yes' this looks like a bug.  Thoughts?  

Russell Keith-Magee

unread,
Dec 6, 2014, 9:15:43 PM12/6/14
to Django Users
Hi Timothy,

No two browsers will ever render things *identically*, but it should certainly be functionally equivalent, and at least bear a striking resemblance to each other. There certainly shouldn't be a missing button or anything like that.

My immediate reaction is that you've probably got something cached in your browser - Chrome caches very aggressively, and sometimes needs to be politely kicked to get it to refresh some resources. However, if you can reproduce this problem if you start from scratch, it's definitely worth a bug report.

Yours,
Russ Magee %-)

--
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...@googlegroups.com.
To post to this group, send email to django...@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/e00baaef-353a-4226-9a43-e574d8c07622%40googlegroups.com.

For more options, visit https://groups.google.com/d/optout.

Timothy Good

unread,
Dec 12, 2014, 10:15:30 AM12/12/14
to django...@googlegroups.com
Russ,

Bingo!  I cleared Chrome's images & files "From the beginning of time"  (now there is a weird idea) and it was fine.

Much appreciated.

Tim
Reply all
Reply to author
Forward
0 new messages