Python Forum
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
gulp template with python?
#11
(Jan-29-2019, 06:58 PM)snippsat Wrote: You don't need to use server that gulp create.
After you have run gulp it's also generated HTML/CSS/JS/img files,this file you need to move to Flask static folder and link them up.

A do show how i link up in tutorial with template that i use there.
It can be different for your template,but it should give a hint on how to do it.
<link rel=stylesheet type=text/css href="{{ url_for('static', filename='vendor/bootstrap/css/bootstrap.min.css') }}" />
# Original link that i have comment out and done link to flask static folder 
<!--<link href="vendor/bootstrap/css/bootstrap.min.css" rel="stylesheet">-->
 
<script src="{{ url_for('static', filename='vendor/jquery/jquery.min.js') }}"></script>
<!--<script src="vendor/jquery/jquery.min.js"></script>-->
 
# images
<img src="static/img/portfolio/cake.png" class="img-responsive" alt="">
yhea i did that, but i missed some scripts, but should i move all the folders (html,css,js,img) to the static folder?
Reply
#12
(Jan-29-2019, 07:07 PM)IMuriel Wrote: but should i move all the folders (html,css,js,img) to the static folder?
Not HTML files which shall be in templates folder.
All other files css,js,img shall be in static folder.
With template that i did use in so did i move the whole folder vendor(with css,js,img) to static folder.
Then link up in HTML(<head> tag) to files in static folder.
Reply
#13
(Jan-29-2019, 07:27 PM)snippsat Wrote:
(Jan-29-2019, 07:07 PM)IMuriel Wrote: but should i move all the folders (html,css,js,img) to the static folder?
Not HTML files which shall be in templates folder.
All other files css,js,img shall be in static folder.
With template that i did use in so did i move the whole folder vendor(with css,js,img) to static folder.
Then link up in HTML(<head> tag) to files in static folder.

maybe i am complicated my self to much i was looking at html code and found something wird,
"@@include("somehting") so i seach for taht in the web and seems like is a gulp thing, so then i find out that in my template folders i have an other folder with all html files again, but this ones doesnt have the @@include, and there are css, images,js folders, so maybe this is a very simple thing, i was using the wrong html, and i just dont need gulp at all, Wall Wall
Reply


Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020