There are many resources that will show you how to plot residuals while solving, for example look here . The core of most (or all..) of them is to filter the numeric values into gnuplot using few unix utilities like so: set logscale y set title "Residuals" set ylabel "Residual" set xlabel "Iteration" plot "< cat log | grep 'Solving for Ux' | cut -d' ' -f9 | tr -d ','" title 'Ux' with lines,\ "< cat log | grep 'Solving for Uy' | cut -d' ' -f9 | tr -d ','" title 'Uy' with lines,\ "< cat log | grep 'Solving for Uz' | cut -d' ' -f9 | tr -d ','" title 'Uz' with lines,\ "< cat log | grep 'Solving for omega' | cut -d' ' -f9 | tr -d ','" title 'omega' with lines,\ "< cat log | grep 'Solving for k' | cut -d' ' -f9 | tr -d ','" titl...
I'm using django 1.1 now, and custom views on the admin site that worked before are now broken. It turns out that you need to add the 'admin' namespace to the url tag in templates. For example: class SubscriptionAdmin(admin.ModelAdmin): # define custom views for the admin def export_csv_view(self, request): return export_csv(request, self.model) # hook custom views into admin site urls def get_urls(self): urls = super(SubscriptionAdmin, self).get_urls() csv_urls = patterns('', url(r'^export-csv/$', self.export_csv_view, name='export_csv'), ) return csv_urls + urls ... ... Using this view in a template, you could write href="{% url export_csv %}" but now it works like this: href="{% url admin:export_csv %}" --[may the namespace be with you]--
Comments
Post a Comment
Your thoughts here