Menu icon Foundation

My Posts

No Content

My Comments

Philippe Luickx commented on Joaz Rivera's post over 4 years

So I managed to get it running and now I am trying to figure out a good workflow.
The problem with the routes was that django is serving the templates, but the Front Matter that Foundation Apps is using declares paths that miss part of it. So django can't find the correct templates, resulting in issues.
E.g. I have my foundation files in static folder, so the templates in my build folder are in
static/foundation/build/templates/index.html
However, the routes have the template paths defined as templates/index.html

When you change the routes.js file that is generated with the correct paths, everything works fine.

I have been wondering though, should the front-end be served by Django or would an easier setup just be to have the standard solution (nodejs?) running and configured when deploying? And have Django running to serve only the REST api?

Philippe Luickx commented on Joaz Rivera's post over 4 years

I got a bit further with this, but not functional yet.
The easiest solution seems to me to have a foundation folder within your django static folder.
In that folder, you create a new foundation app with the CLI. You then watch this folder.

With django you simply link then to the app.js, routes.js and foundation.js files and the app.css file that get generated in the build/assets folder.

Where I am stuck is the routes. I do not get a new view, but have a second "full" html view within my ui-view. So the navbar is duplicated and all...

Philippe Luickx commented on Ioannis Karavasilis's post over 4 years

+1
Same problem here... Trying to integrate my django backend to have a Foundation apps frontend. Serving pages through django, but getting stuck on this every time...

Philippe Luickx commented on Joaz Rivera's post over 4 years

+1 for this!
I basically see 2 approaches: either you simply include all the js and css files in your base template for your django project. You would have to set up a lot of stuff yourself (compass e.g.?)
Or you start a foundation project e.g. in your statics folder and point your settings to the right static and template folders.

Struggling with the actual implementation though, any thoughts are welcome here!

Posts Followed

No Content

Following

    No Content

Followers

My Posts

No Content

My Comments

You commented on Joaz Rivera's post over 4 years

So I managed to get it running and now I am trying to figure out a good workflow.
The problem with the routes was that django is serving the templates, but the Front Matter that Foundation Apps is using declares paths that miss part of it. So django can't find the correct templates, resulting in issues.
E.g. I have my foundation files in static folder, so the templates in my build folder are in
static/foundation/build/templates/index.html
However, the routes have the template paths defined as templates/index.html

When you change the routes.js file that is generated with the correct paths, everything works fine.

I have been wondering though, should the front-end be served by Django or would an easier setup just be to have the standard solution (nodejs?) running and configured when deploying? And have Django running to serve only the REST api?

You commented on Joaz Rivera's post over 4 years

I got a bit further with this, but not functional yet.
The easiest solution seems to me to have a foundation folder within your django static folder.
In that folder, you create a new foundation app with the CLI. You then watch this folder.

With django you simply link then to the app.js, routes.js and foundation.js files and the app.css file that get generated in the build/assets folder.

Where I am stuck is the routes. I do not get a new view, but have a second "full" html view within my ui-view. So the navbar is duplicated and all...

You commented on Ioannis Karavasilis's post over 4 years

+1
Same problem here... Trying to integrate my django backend to have a Foundation apps frontend. Serving pages through django, but getting stuck on this every time...

You commented on Joaz Rivera's post over 4 years

+1 for this!
I basically see 2 approaches: either you simply include all the js and css files in your base template for your django project. You would have to set up a lot of stuff yourself (compass e.g.?)
Or you start a foundation project e.g. in your statics folder and point your settings to the right static and template folders.

Struggling with the actual implementation though, any thoughts are welcome here!

Posts Followed

No Content

Following

  • No Content

Followers

  • No Content