straight55b / app-engine-patch

Automatically exported from code.google.com/p/app-engine-patch
0 stars 0 forks source link

The media generator has stopped working for an unknown reason. #140

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
What steps will reproduce the problem?
I'm not entirely sure.  

What is the expected output? What do you see instead?
The media generator has just randomly stopped combining and compressing the
media on the fly.  Also, the new MEDIA_URL has randomly changed from
/media/MEDIA_VERSION/etc to /generated_media/media/MEDIA_VERSION/etc.  Now
I have to execute "python manage.py generatemedia" every time I change
something in the css or js files.    

Also, if I change the MEDIA_VERSION number in the settings file the media
doesn't show up in the new MEDIA_VERSION folder.

What version of the product are you using? On what operating system?
All the latest. XP Pro

Please provide any additional information below.
I removed the urlautos and just put everything in urls.py.  I believe this
is when it started happening, but I'm not entirely sure.

Original issue reported on code.google.com by paubi...@gmail.com on 11 May 2009 at 2:02

GoogleCodeExporter commented 9 years ago
The media generator has improved, so media gets combined on-the-fly by a 
middleware
component when running the dev_appserver. That's why the MEDIA_URL now gets 
prefixed
with /generated_media/. Did you really check whether the media files can be 
accessed
via the MEDIA_URL?

Original comment by wkornew...@gmail.com on 11 May 2009 at 4:36

GoogleCodeExporter commented 9 years ago
The media files can be accessed via the MEDIA_URL, however the "on-the-fly"
functionality has completely ceased working.  All of sudden, I have to run the 
media
generator manually.  I can't figure it out.

Original comment by paubi...@gmail.com on 11 May 2009 at 5:28

GoogleCodeExporter commented 9 years ago
No, it works correctly. There is no need to run manage.py generatemedia. The
_generated_media folder is *not* used when you run "manage.py runserver".

The "on-the-fly" feature you mentioned wasn't really on-the-fly because it was 
only
executed when you run the manage.py command, but in the new release everything 
is
done really (!) on-the-fly by a middleware which intercepts everything at 
MEDIA_URL.
Only compression is disabled (helps with debugging), but files still get 
combined.
The advantage is that you can modify your media files and reload the page in 
your
browser and changes take effect immediately. In the previous version you'd have 
to
run "manage.py generatemedia" or restart the dev_appserver.

Original comment by wkornew...@gmail.com on 11 May 2009 at 8:59

GoogleCodeExporter commented 9 years ago
I understand.  I have the latest version.  It was generating the media 
"on-the-fly",
for a while but then it abruptly stopped working for some reason.  That's my 
issue. 
Why did it just stop working all of a sudden?   The middleware is included in 
the
settings(mediautils), etc.  I can't figure why it would just stop working.

Original comment by paubi...@gmail.com on 11 May 2009 at 9:09

GoogleCodeExporter commented 9 years ago
What makes you think it stopped working? If you can access your media via 
MEDIA_URL
then it does work 100% correctly.

Original comment by wkornew...@gmail.com on 11 May 2009 at 9:14

GoogleCodeExporter commented 9 years ago
The MEDIA_URL randomly changed from /media/MEDIA_VERSION/etc to
/generated_media/media/MEDIA_VERSION/etc.  Once this happened, I changed the 
app.yaml
media url redirect to from /media to /generated_media/media to point to
"_generated_media".

So for some unknown reason the media generator stopped working and the MEDIA_URL
changed from "/media" to "/generated_media/media".

Original comment by paubi...@gmail.com on 11 May 2009 at 9:30

GoogleCodeExporter commented 9 years ago
OK, that's the problem. Please change your app.yaml back to /media. The 
MEDIA_URL
gets changed to /generated_media/... on the dev_appserver because /media gets 
caught
in app.yaml and thus never reaches Django. Since you changed your app.yaml to 
catch
/generated_media/... the media generator middleware is never reached in Django.

Original comment by wkornew...@gmail.com on 12 May 2009 at 5:36