Had the same problem. Seems the top-level problem is with extending the django admin template "change_form.html". It has a tag in there referring to "app_list" which isn't set when we extend. More than that I couldn't fix right now.
So worked around it by, for the form, change to extend *base_site.html*instead of change_form.html. Means you have to specify a bit more stuff - submit button etc - but least it works. HTH Nick On Sunday, 9 September 2012 08:33:36 UTC+10, vijay shanker wrote: > > hi > i have this model called charity > ___________________________________________ > from django.db import models > from settings import DEFAULT_CHARITY_NAME as deafult_charity_name > > > class GetDefaultInstance(models.Manager): > def get_default_instance(self): > return > super(Charity,self).get_query_set().filter(charity_name=default_charity_name) > > > class Charity(models.Model): > class Meta: > verbose_name_plural = 'Charities' > app_label = 'charities' > charity_name = models.CharField(max_length=50) > in_percentage = models.IntegerField(help_text='default value is 0,\ > leave blank if you will enter > fixed amount.', default=0, blank=True,null=True) > fixed_amount = models.IntegerField(help_text='default value is 0,\ > leave blank if you entered > amount in percentage.',default=0, blank=True, null=True ) > > objects = models.Manager() > default_instance = GetDefaultInstance() > > def __unicode__(self): > return '%s'%self.charity_name > > _______________________________- > > in urls: > (r'^admin/charity_report/(?P<itemdetails_id>[-\w]+)/$', > 'charities.admin_views.report'), > __________________________________________ > > and another model called ItemDetails which have forignkey relation with > above model, with default instance of charity attached to each Itemdetail > object . > I wanted to add admin button alongside history button so user can see > amount charged as charity and stuff like percentage deduction,amount > deducted etc. > > i managed to show the button but when clicked at it gives this trace: > http://pastebin.com/03wscYLX > > the settings is at: > http://pastebin.com/7FYY189D > > the other regular info are in: > http://pastebin.com/QmAdEeP9 > > its been 2-3 days trying to run it on apache server.. it works ok on local > machine. > > i override form_change template and provide the button, write urls for > admin > -- You received this message because you are subscribed to the Google Groups "Django users" group. To view this discussion on the web visit https://groups.google.com/d/msg/django-users/-/tEJybmfR9t4J. 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.