Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DAL static not loading in template #907

Closed
davideghz opened this issue Sep 2, 2017 · 2 comments
Closed

DAL static not loading in template #907

davideghz opened this issue Sep 2, 2017 · 2 comments

Comments

@davideghz
Copy link
Contributor

davideghz commented Sep 2, 2017

Hi everybody - my question is a bit general, but I can provide you with the relevant bits if necessary ..

I'm able to load a DAL form in my home-page, which is extending base.html. The same DAL form does not work in another template which is extending the same base.html. I mean, the DAL JS files are not loaded in the other template..

What might be the problem?

This is what is not loaded in the other template:

<link href="/static/autocomplete_light/vendor/select2/dist/css/select2.css" type="text/css" media="all" rel="stylesheet" />
<link href="/static/autocomplete_light/select2.css" type="text/css" media="all" rel="stylesheet" />
<script type="text/javascript" src="/static/autocomplete_light/jquery.init.js"></script>
<script type="text/javascript" src="/static/autocomplete_light/autocomplete.init.js"></script>
<script type="text/javascript" src="/static/autocomplete_light/vendor/select2/dist/js/select2.full.js"></script>
<script type="text/javascript" src="/static/autocomplete_light/select2.js"></script>
@davideghz
Copy link
Contributor Author

I was passing the form into the context with the varibale named event_track_form ..I just renamed it to form and now it works.. is it somehow related to DAL internals?

@jpic
Copy link
Member

jpic commented Sep 2, 2017

Probably related to having {{ form.media }} in the template, perhaps you could try with {{ event_track_form.media }} ?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants