ordering of post_syncdb signals?
Hi folks, I am a little confused with the ordering of the post_syncdb signal? (using 1.2.4) Looking at the code in auth and contenttype, what makes auth.permission so sure that the appropriate content type was created before the necessary permission is created? Similarly, I have another app called 'payment', and inside my management/__init__.py, i have the following: from django.contrib.auth.models import Group, Permission import payment.models as payModels def init_permissions(sender, **kwargs): """ initialization when appliation starts """ agents = Group.objects.get(name = "agents") import pdb pdb.set_trace() if not agents.permissions.filter(codename="can_buy_package").exists(): perm = Permission.objects.get(codename="can_buy_package") agents.permissions.add(perm) post_syncdb.connect(init_permissions, sender=payModels) I couldn't get this to work because the permissions were not created for my models at this stage. So, how is the ordering of the post_syncdb executed? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.
django template strange behavior
Hi guys, {% if None == False %} abc {% endif %} Strangely my template displayed abc. Any explanation? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.
filteredselectmultiple widget breaks when in dialog box
hi folks, I am using the FilteredSelectMultiple widget for my manytomanyfield, as seen on the admin site. At the moment, everything is fine. However, if I place this widget within a jquery dialog, the script breaks. I cannot move my items from the first list to the second. {{ form.students.errors }} {{ form.students }} My script: $(document).ready(function(){ $('#students_input').dialog({ autoOpen:false, modal:true, height:300, width:350, }); $(":submit").click( function(){ $("form").data("submit-button", this.name); }); $("form").submit(function() { $('#students_input').dialog('open'); //other stuffs }); Error message: SelectBox.cache[id] is undefined http://foobar.com/media/admin/js/SelectBox.js Line 58 Can anyone shed some light to this? -- You received this message because you are subscribed to the Google Groups "Django users" group. To post to this group, send email to django-users@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.