[Flask] Questions from a new user of Flask

Corey Boyle coreybrett at gmail.com
Thu Jan 5 07:58:37 EST 2017


You may also want to set SEND_FILE_MAX_AGE_DEFAULT to 0 when you are
makings regular changes to your static files.

http://flask.pocoo.org/docs/0.12/config/#builtin-configuration-values

On Thu, Jan 5, 2017 at 3:36 AM, Felix Louistisserand
<felix.louistisserand at inria.fr> wrote:
> Apparently it was, it seems solved after I install a dedicated application
> to empty the cache. It was not obvious at all because setting manually
> Firefox to disable the cache is not enough. So it seems finally Flask is not
> responsible for this at all: that's just a common "bug" (it might be
> intended but that's weird) for Chrome and Firefox.
>
> Thank you !
>
> Felix
>
> ________________________________
>
> De: "Jonathan Metz" <jcmetz21 at gmail.com>
> À: "Corey Boyle" <coreybrett at gmail.com>
> Cc: "Felix Louistisserand" <felix.louistisserand at inria.fr>, "flask"
> <flask at python.org>
> Envoyé: Mercredi 4 Janvier 2017 18:20:18
> Objet: Re: [Flask] Questions from a new user of Flask
>
> Are you sure it's not a cache problem? I had the same issue a few weeks ago
> and disabling the cache via chrome developer tools did the trick.
> http://stackoverflow.com/questions/5690269/disabling-chrome-cache-for-website-development
>
> On Wed, Jan 4, 2017 at 4:55 AM, Corey Boyle <coreybrett at gmail.com> wrote:
>>
>> Without more details (code, input, output, errors, etc) your question
>> can not be answered.
>>
>> On Wed, Jan 4, 2017 at 7:43 AM, Felix Louistisserand
>> <felix.louistisserand at inria.fr> wrote:
>> > I already tried the debug mode, it doesn't solve my problem. Note that
>> > the problem is the persistence of datas even through reboots of the server,
>> > not only when actualizing.
>> >
>> > ----- Mail original -----
>> >> De: "Ziirish" <ziirish at ziirish.info>
>> >> À: "Felix Louistisserand" <felix.louistisserand at inria.fr>
>> >> Cc: flask at python.org
>> >> Envoyé: Mercredi 4 Janvier 2017 12:02:53
>> >> Objet: Re: [Flask] Questions from a new user of Flask
>> >>
>> >> Hello,
>> >>
>> >> * On Wednesday, January 04, 2017 at 11:50 AM +0100, Felix
>> >> Louistisserand
>> >> <felix.louistisserand at inria.fr> wrote:
>> >> > Happy new year !
>> >> >
>> >> > I am currently having some issues in the development of a web
>> >> > application,
>> >> > and it may be because of some misuse of Flask. If you could help me
>> >> > on
>> >> > this it will be awesome !
>> >> >
>> >> > As the application is still in development, the datas and the source
>> >> > code
>> >> > changes quite frequently. I noticed that after changing the templates
>> >> > I
>> >> > had to re-launch the server to make the changes occur. That was not a
>> >> > problem at first. However as my projected grew it began to happen
>> >> > that
>> >> > changes didn't took place, even after re-launching the server. I
>> >> > first
>> >> > thought it was a cache problem but the issues carries on over
>> >> > different
>> >> > web navigators (I tested Firefox and Chrome) and even in private
>> >> > navigation of after manually cleaning the cache.
>> >> > I discovered that this problem doesn't only concern templates but all
>> >> > the
>> >> > static files too.
>> >> > Is that a known problem ? I found no mention of it on the Internet
>> >> > but
>> >> > maybe someone already encountered it here.
>> >> > Of course it could have no link with Flask itself, but for now I have
>> >> > no
>> >> > idea where else does it could come from.
>> >>
>> >> If think the configuration setting you are looking for is
>> >> TEMPLATES_AUTO_RELOAD.
>> >> This option defaults to True when DEBUG mode is enabled:
>> >> http://flask.pocoo.org/docs/0.12/quickstart/#debug-mode
>> >>
>> >> >
>> >> >
>> >> > As a side question, I wonder what is the recommended method to pass
>> >> > arguments to javascript from flask. Currently I am doing it with a
>> >> > <script> field in my template, but it doesn't feel good. Is there a
>> >> > better
>> >> > way to do that ?
>> >>
>> >> I don't have an answer yet for this question. The best I found so far
>> >> is:
>> >>
>> >> https://stackoverflow.com/questions/10314800/flask-url-for-urls-in-javascript
>> >>
>> >> But at the moment I'm stick with what you do (ie. managing my
>> >> javascript code
>> >> as
>> >> a jinja template)
>> >>
>> >> >
>> >> > Thank you for your attention,
>> >> >
>> >> > Felix
>> >>
>> > _______________________________________________
>> > Flask mailing list
>> > Flask at python.org
>> > https://mail.python.org/mailman/listinfo/flask
>> _______________________________________________
>> Flask mailing list
>> Flask at python.org
>> https://mail.python.org/mailman/listinfo/flask
>
>
>


More information about the Flask mailing list