Django Static compressed files not rendering on Firefox - django

I am using django-static for optimization of static stylesheets and javascripts. Now all these scripts and css properties are being loaded in Chrome and on Safari. But for some reason they are not loading in Firefox. Am i doing something wrong? Does Firefox require some other setting ?
If additional information is required please comment. I will add it. (Firefox version 8)
EDIT:
After checking Chrome and Firefox using Firebug. I found that the script being rendered was with the source as
src="/media/js/hawk\foo_boo_ajax_too_forms_refer_moder.1323864494.js
Now this is being interpreted by Chrome as
src="/media/js/hawk/foo_boo_ajax_too_forms_refer_moder.1323864494.js
But firefox is not able to interpret it. Is this a firefox issue or do i have to change the "/"? (The link or source being generated is by django-static. )

Per the URI spec, you need to change to '/'.

make sure you have the correct Content-Type and Content-Encoding headers set for your js and css files.

The above said issue ,is a bug in django-static. This issue crops up on windows machine.(On windows it mixes up file system path and the url.)I have contacted the developer, and I think the issue will be solved soon. Hope this helps others.

Related

Setting X-Frame-Options header without changing java

I have a black box application that runs on old obsolete Jetty 7. However, it has been working well since we installed it in 2014, and I need it to continue running. I have been asked to add an X-Frame-Options header to the interface, and every time I try to do this by changing Java I get class incompatibility errors. I can, however, make any changes I like to the JSP files, to web.xml, or to the Jetty configuration files in jetty/etc, but so far I have not found a change that works. I tried adding
<* response.addHeader(“X-FRAME-OPTIONS”, “DENY”); *>
to various JSP files but it doesn't seem to help. Does anyone have any ideas?

Data in and changes to app.scss in Ember CLI application not reflected in browser

I've recently started my first Ember CLI project, and have loaded broccoli-sass to handle the stylesheets as instructed by various sources. Editing the app.scss with various test css (e.g. body {background-color:red}) that broccoli-sass provides does not result in any changes in the browser. Furthermore, checking project-name.css in the developer tools reveals an empty file--does this mean that app.scss is not being compiled? Am I supposed to manually compile this myself, or is something not happening?
Assuming you are using the latest ember-cli (0.2.3) just run this:
ember install ember-cli-sass
Put your stylesheet in app/styles/app.scss
And it should just work.
I variety of errors in stylesheets included in app.scss caused app.scss to fail to load. Once these errors were corrected, the file compiled.

Qt 5.1.1: QWebView doesn't load local html file

I've been struggling with an issue regarding loading a local html file. I'm going off the assumption that a QWebView is the correct way to be trying to display this file. My issue is that while I have the .html file visible when running in Debug, when I attempt to run in Release it is not visible. I am including the file in the appropriate directories, so that's no the issue. Are there any additional settings, libs, dlls that I could be missing? I've got the file specified to the QWebView in Qt Creator in the URL field of the QWebView. It is displayed like below:
file:///C:/devel/projects/myProject/myProject/Resources/page.htm
I've changed the file to a .html as well, it doesn't seem to make a difference.
Thanks,
-K
Edit: I've changed it temporarily to:
waiver_webView_2->setUrl(QUrl::fromLocalFile("file:///C:/devel/projects/myProject/myProject/Resources/page.htm"));
Unfortunately this still does not work. I've verified and the file does actually exist there. When I provide that location to the URL via the Qt Creator it works on my developer machine in release but not on a machine I deploy to, DESPITE the folder structure being absolutely identical.
The best I could find was getting the absolute path of the file first and then using that path with QUrl. There's a qt forum post on this topic which I'll put as a source bellow. It can be adapted to your code like so:
waiver_webView->load(QUrl::fromLocalFile(QFileInfo("page.htm").absoluteFilePath()));
QFileInfo also needs to be included.
source https://forum.qt.io/topic/23653/qurl-fromlocalfile-and-relative-path/4

Can I disable precompilation for a particular folder?

I have some .cshtml templates I'm using to render to PDFs.
When I deploy to production they get precompiled and contain the text "This is a marker file generated by the precompilation tool, and should not be deleted!" Is there a way to tell ASP.NET not to precompile a particular subfolder? I thought maybe I could do this in web.config, but I can't find it.
I know this is 2 years old but recently I stumbled on the same problem, but since I needed the view for both MVC and e-mail I couldn't simply change the extension of the file.
Searching for solutions I found this documentation on aspnet_compiler and the -u options, that stands for Updatable, which keeps the original file intact after compilation.
In order to achieve the desired behavior I configured my publish profile as follow:
On Settings tab of Publish dialog expand the File Publish Options and check Precompile during publishing.
Click the Configure link after the checkbox and check Allow precompiled site to be updatable
Caution
Before jumping in this solution you should read carefully about the implications of this option. In the link I provided there is a Precompilation Decision Matrix to help on your decision.
I couldn't stop the views from being compiled, even by setting the build action to 'none' and turning on copy to output directory.
I ended up changing the extensions of my files to .prod, setting the content type as 'content', and setting them to open with the HTML editor in Visual Studio to get everything working the way I wanted.

Custom Sitecore dialog broken with upgrade to v6.6

I recently updated our site from Sitecore 6.3.1 to the latest 6.6 release. Now my custom dialog app is giving me a "Page Not Found" error.
It lives in sitecore/shell/Applications/Dialogs along with all of the built-in Sitecore tools accessible in Content Editor: Publishing, CopyTo, Clone, etc. These are working fine.
Did 6.6 change the way these paths are resolved? Do I need to add my custom application name to a config somewhere? All files are in place... and the code is definitely up to date. The class declaration is public class LanguagePopUpForm : DialogForm. Is DialogForm still valid here?
This issue can be caused by the layout not being updated properly or linked correctly.
Try to open the content editor, navigate to the sitecore/shell/Applications/Dialogs/YourDialog item and check on the Presentation tab if what are the Layout Details of your application.
If the link there is not broken, open the layout item of this application and see what is the value of the Control or Path fields. Then try to find the file in your web application files and if it exists, open the proper file in the browser.