SaveFig(graph_filename) VS canvas.print_png(graph_filename)

2017-05-10 Thread Thames Khi
I have a small app which generates a graph and saves it to a file. The file is then displayed using a reference. My question is, is it better to use matplotlib.pyplot SaveFig function or matplotlib.backends.backend_agg import FigureCanvasAgg as FigureCanvas function? Here is an extract of my

SaveFig(graph_filename) VS canvas.print_png(graph_filename)

2017-05-10 Thread Thames Khi
Hi I am wondering the best method to save a graph to a file which is then displayed on a rendered webpage? Currently, I have URL which calls a view. This view: def graph(request): from datetime import datetime, timedelta graph_filename = (djangoSettings.STATICFILES_DIRS[0] + 'graph_' +

Just learning about auth in django and getting error NoReverseMatch ; Exception Value: Reverse for 'password_reset_done' with arguments

2017-04-07 Thread Thames Khi
My example is simple, I am happy to use the standard views and templates provided by Django. NoReverseMatch at /myapp/password/reset/ Reverse for 'password_reset_done' with arguments '()' and keyword arguments '{}' not found. 0 pattern(s) tried: [] Request Method: GET Request URL:

Re: good doc and example on how to use bootstrap with DJango

2017-02-02 Thread Thames Khi
Thanks I will take a look. So much to learn too much fun. On Thursday, February 2, 2017 at 2:40:15 AM UTC, Melvyn Sopacua wrote: > > On Wednesday 01 February 2017 02:40:48 Thames Khi wrote: > > > > > I tried to use locally installed bootstrap. My render HTML function is

Re: good doc and example on how to use bootstrap with DJango

2017-02-01 Thread Thames Khi
Thank you so much, you are a legend, sir! I can now continue my learning and combine my python database code with django. I am very grateful, thank you for taking the time to explain this to me. Kind Regards, TiKhi On Wednesday, February 1, 2017 at 8:11:52 PM UTC, Thames Khi wrote

Re: good doc and example on how to use bootstrap with DJango

2017-02-01 Thread Thames Khi
he bootstrap files in a static directory (or a > subdirectory to static) under one of you applications. Then run > collectstatic - and you will get the files copied to the place you will > serve them from (this is not necessary when running in debug though). > > Regards, > &

Re: good doc and example on how to use bootstrap with DJango

2017-02-01 Thread Thames Khi
essing them from the webserver and the paths are > relative to the current base url (or html file). There is no difference > between bootstrap and other css / js files in this regard. > > Regards, > > Andréas > > 2017-02-01 11:40 GMT+01:00 Thames Khi <tham...@gmail.co

good doc and example on how to use bootstrap with DJango

2017-02-01 Thread Thames Khi
Hi, I tried to use locally installed bootstrap. My render HTML function is calling my page. However using the relative path or even if add the complete path, nothing works. If the html page is opened directly it works. Is there any decent documentation and examples of using locally installed

Re: How can I solve the broken home page in the root folder?

2017-01-31 Thread Thames Khi
ain app. > > > On 31 Jan 2017 1:09 p.m., "Thames Khi" <tham...@gmail.com > > wrote: > > I followed a simple tutorial to create a sample application in DJango. > Here is my code for urls.py in the root folder: > > from django.conf.urls import url, inc

How can I solve the broken home page in the root folder?

2017-01-31 Thread Thames Khi
I followed a simple tutorial to create a sample application in DJango. Here is my code for urls.py in the root folder: from django.conf.urls import url, include from django.contrib import admin #from data import views urlpatterns = [ url(r'^data/', include('data.urls')), url(r'^admin/',

Re: Can any one help me with this error "Page not found (404)" ?

2017-01-31 Thread Thames Khi
Once the polls app is created there is no reference to the root /project site! On Wednesday, April 27, 2011 at 1:48:17 PM UTC+1, Oleg Lomaka wrote: > > Go on read 3rd part of tutorial about urls.py configuration > http://docs.djangoproject.com/en/dev/intro/tutorial03/ > > > On Wed, Apr 27, 2011