This repository has been archived by the owner. It is now read-only.

Stylesheet issue #216

Closed
MiteshShah opened this Issue Dec 10, 2015 · 14 comments

Comments

Projects
None yet
4 participants
@zfjagann

This comment has been minimized.

Copy link
Contributor

zfjagann commented Dec 10, 2015

Which browser and version are you using?

Do you think you could provide the console log from your browser? (e.g. Ctrl-Shift-J/Cmd-Opt-J on Chrome) To get the full output you may need to open the console log and refresh the page with the log open.

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 10, 2015

Well, the issue is that the link resource is not being evaluated see the first line of the screenshot.

Once thing to verify would be if wether the css is available at the given path: /static/bootstrap/themes/default/css/bootstrap.min.css

It is weird that it did not get rendered anyway. Can you give more details on: what browser you are using, what OS, does that reproduce after a forced refresh (Ctrl-Alt-R)...

@MiteshShah

This comment has been minimized.

Copy link
Contributor

MiteshShah commented Dec 11, 2015

@chantra @zfjagann MAC OS El Captain 10.11.2
Gogole Chrome Version 47.0.2526.80 (64-bit)

Dirty Fix:

vim ~/dev/atc/venv/lib/python2.7/site-packages/atc_demo_ui/templates/atc_demo_ui/base.html 

# Find and replace follwoing lines
    <!-- Bootstrap CSS -->
    {% bootstrap_styles theme='default' type='min.css' %}
    <!-- Bootstrap JS -->
    {% bootstrap_script use_min=True %}

    <!-- Bootstrap CSS -->
    <link rel="stylesheet" href="/static/bootstrap/themes/default/css/bootstrap.min.css" type="text/css">
    <!-- Bootstrap JS -->
    <script type="text/javascript" src="/static/bootstrap/js/bootstrap.min.js"></script>

atc

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

Seems like the tags from https://github.com/no-dice/django-bootstrap-themes are not being evaluated correctly.
I wonder what the generated html source looked like.

@harshadyeola

This comment has been minimized.

Copy link

harshadyeola commented Dec 11, 2015

@MiteshShah

This comment has been minimized.

Copy link
Contributor

MiteshShah commented Dec 11, 2015

@chantra Page Source - http://pastebin.com/1zgahvix

 <!-- Bootstrap CSS -->
    &lt;link rel=&quot;stylesheet&quot; href=&quot;/static/bootstrap/themes/default/css/bootstrap.min.css&quot; type=&quot;text/css&quot;&gt;
    <!-- Bootstrap JS -->
    &lt;script type=&quot;text/javascript&quot; src=&quot;/static/bootstrap/js/bootstrap.min.js&quot;&gt;&lt;/script&gt;
@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

@MiteshShah thanks. there is some escaping going on here.... 😄

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

I just tested and it does not repro on django 1.7 and django_bootstrap_theme 3.1.2

https://gist.github.com/chantra/d1bc8e6cc0225e3e0c08

@MiteshShah I would guess you use django 1.9 and https://docs.djangoproject.com/en/1.9/releases/1.9/#simple-tag-now-wraps-tag-output-in-conditional-escape is kicking in.

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

Could repro on Django 1.9 and opened no-dice/django-bootstrap-themes#2

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

@MiteshShah thanks for reporting this. Currently ATC supports Django 1.7 (https://github.com/facebook/augmented-traffic-control/blob/master/Setup.md#python-27-and-pip) while it most likely work with newer django (aside from this ui glitch), we do not support it.

The fix here really is to get the upstream module fixed. In the meantime if you dont want to patch your own version of base.html, you can downgrade django to 1.7.

I will close this issue as there is some work arounds and will try to get this addressed upstream.

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 11, 2015

I will leave this open a bit more given that there were other reports, it is not super explicit that we support django 1.7 (looking at the different docs we have, it is sometime mentioned 1.7 sometimes 1.7+)

@chantra chantra reopened this Dec 11, 2015

MiteshShah added a commit to MiteshShah/augmented-traffic-control that referenced this issue Dec 12, 2015

chantra added a commit that referenced this issue Dec 12, 2015

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Dec 14, 2015

no-dice/django-bootstrap-themes/pull/3 should be addressing this issue.

@chantra

This comment has been minimized.

Copy link
Contributor

chantra commented Jan 7, 2016

https://pypi.python.org/pypi/django-bootstrap-themes/3.1.3 is out there! I will close this task as future should not hit this issue anymore.

@chantra chantra closed this Jan 7, 2016

@zfjagann

This comment has been minimized.

Copy link
Contributor

zfjagann commented Jan 8, 2016

🎊 👍 🎊 👊 🎊

@chantra chantra referenced this issue Mar 23, 2016

Closed

ugly page view #253

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.