Misc: admin media, pdf search path
Admin preview view now includes javascript tags provided by media, There are dependencies added for backbone and underscore in that specific admin page.
This commit is contained in:
parent
1a702665fd
commit
440163e504
4 changed files with 34 additions and 7 deletions
4
admin.py
4
admin.py
|
@ -15,6 +15,9 @@ class PageAdmin(admin.ModelAdmin):
|
|||
list_display = ['document', 'name', 'image', 'page_num']
|
||||
order_by = ['document', 'page_num']
|
||||
|
||||
class Media:
|
||||
js = ("lib/underscore.js", "lib/backbone.js",)
|
||||
|
||||
def get_urls(self):
|
||||
urls = super(PageAdmin, self).get_urls()
|
||||
my_urls = patterns('',
|
||||
|
@ -25,6 +28,7 @@ class PageAdmin(admin.ModelAdmin):
|
|||
def preview(self, request, pk):
|
||||
context = {}
|
||||
context['page'] = models.Page.objects.get(pk=pk)
|
||||
context['media'] = self.media
|
||||
|
||||
return TemplateResponse(request,
|
||||
'admin/pdfformfiller/page/preview.html',
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue