WYSIWYG publishing and Django

Issues related to previewing and publishing your web site.
Post Reply
Myuru
 
 
Posts: 9
Joined: Wed Aug 16, 2017 1:42 pm

WYSIWYG publishing and Django

Post by Myuru » Mon Sep 18, 2017 12:20 pm

Hi,

I have a problem with my current projet, i use the framework Python+Django and most of my call to static ressources like js / css / images are formated to be linked to Django like this for example :

Code: Select all

<script src="{% static 'js/jquery-1.12.4.min.js' %}"></script>
My problem is that WYSIWYG generate on it's own the call of the page css for example

Code: Select all

<link href="../static\css/Gestion_Mouvements.css" rel="stylesheet">
<link href="../static\css/mouvementDetails.css" rel="stylesheet">
The problem is that if the path stay "../static" instead of the django call {% static ' ' %} it generete alot of errors on my site, and since they are in the header of the html i can't touch it on WYSIWYG, i have change it once the page is published on Eclipse.

Does anyone have an idea on how to proceed ? can i change thoses lines directly in WYSIWYG ?

User avatar
Pablo
 
Posts: 20138
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: WYSIWYG publishing and Django

Post by Pablo » Mon Sep 18, 2017 12:28 pm

WYSIWYG Web Builder is not a HTML or code editor. You cannot manually edit the code.
Note that this is not very common functionality, it has not been requested before.

Myuru
 
 
Posts: 9
Joined: Wed Aug 16, 2017 1:42 pm

Re: WYSIWYG publishing and Django

Post by Myuru » Mon Sep 18, 2017 12:30 pm

but can i avoid him writing those calls to static ressources and write it myself in the header on the WYSIWYG interface inside the header like i do for the rest of the calls ?

like would i be able to change so settings so that when i publish

Code: Select all

<script src="../static\js/wwb12.min.js"></script>

become

Code: Select all

<script src="{% static 'static\js/wwb12.min.js' %}"></script>
Last edited by Myuru on Mon Sep 18, 2017 12:50 pm, edited 1 time in total.

User avatar
Pablo
 
Posts: 20138
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: WYSIWYG publishing and Django

Post by Pablo » Mon Sep 18, 2017 12:49 pm

You can add your own code in the Page HTML, but you cannot edit the generated code other than by modifying the properties.
The software was not designed to be used this way.

Myuru
 
 
Posts: 9
Joined: Wed Aug 16, 2017 1:42 pm

Re: WYSIWYG publishing and Django

Post by Myuru » Mon Sep 18, 2017 12:53 pm

My problem isn't that i have to add HTML code, i can add those calls in the header without a problem.

The problem is that the call like that

Code: Select all

<script src="../static\js/wwb12.min.js"></script>
will create problem, so is there any properties i can change to avoid him publishing those line along the HTML code ?

User avatar
Pablo
 
Posts: 20138
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: WYSIWYG publishing and Django

Post by Pablo » Mon Sep 18, 2017 1:08 pm

The reason why this code is added is because the script is required by an option you have selected.
The code will not be added if it's not necessary.
It is not possible to remove the code, because then the page will no longer work.

Myuru
 
 
Posts: 9
Joined: Wed Aug 16, 2017 1:42 pm

Re: WYSIWYG publishing and Django

Post by Myuru » Mon Sep 18, 2017 1:13 pm

Is it possible to make WYSIWYG launch a home made script that i make that would parse and change those lines ?

And any idea idea what component could make use of the call to

Code: Select all

<script src="../static\js/wwb12.min.js"></script>
And what about jquery js / css, WYSIWYG add the code aswell but is there an option allowing me to avoid that since i'm calling them myself ?

User avatar
Pablo
 
Posts: 20138
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: WYSIWYG publishing and Django

Post by Pablo » Mon Sep 18, 2017 1:23 pm

Is it possible to make WYSIWYG launch a home made script that i make that would parse and change those lines ?
No, that is not possible. This is a very specific requirement. I don't think this functionality would be useful for a lot of users.
And any idea idea what component could make use of the call to
It can be anything. It may events, slideshows, animations. I can only tell by looking at the project.
And what about jquery js / css, WYSIWYG add the code as well but is there an option allowing me to avoid that since i'm calling them myself
You can avoid including jQuery by not using any objects that depend on this.
One again, this is a very unusual request, this is not the purpose of this software.
If you want full control over the code then you will need an HTML/code editor. This cannot be done with a HTML generator like WWB.

Myuru
 
 
Posts: 9
Joined: Wed Aug 16, 2017 1:42 pm

Re: WYSIWYG publishing and Django

Post by Myuru » Mon Sep 18, 2017 3:00 pm

Thanks for all your answer i understand it's not the purpose of this software, but i do think it would be great for people for want to use it in pair with Django/python or other framekwork to be able to overwrite those calls.

User avatar
Pablo
 
Posts: 20138
Joined: Tue Mar 28, 2006 12:00 pm
Location: Europe
Contact:

Re: WYSIWYG publishing and Django

Post by Pablo » Mon Sep 18, 2017 3:34 pm

You can post suggestions in the 'Suggestions' section of this forum.
If other users find it useful then they can vote for it.

Post Reply

Who is online

Users browsing this forum: No registered users and 3 guests