Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 8838723
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 14, 20262026-06-14T10:04:56+00:00 2026-06-14T10:04:56+00:00

In Web2py I am creating some email templates and want to include the tag

  • 0

In Web2py I am creating some email templates and want to include the tag with my css file LOAD’ed into the view.
How do I use the LOAD function in the view so that it doesn’t use jquery as it is an email and pulls from static, css, base.css.
This is what I have now:

<link href="{{=URL('static', 'css/style.css', scheme='http')}}" rel="stylesheet" type="text/css" />

But with this requires that remote content be loaded and most email applications disable this loading.
I was wanting to do this:

{{=LOAD(url=URL('static', 'css/style.css', scheme='http'),ajax=False)}}

But it is returning this:

<script type="text/javascript"><!--
web2py_component('http://127.0.0.1:8000/iid_app/static/css/web2py.css','c382784163112');
//--></script><div id="c382784163112">loading...</div>
<script type="text/javascript"><!--
web2py_component('http://127.0.0.1:8000/iid_app/static/css/style.css','c3845864949');
//--></script><div id="c3845864949">loading...</div>

Any ideas on how to make this just include the test from the file?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-14T10:04:57+00:00Added an answer on June 14, 2026 at 10:04 am

    If you want to include the content of a CSS file in the email template, just add the following to the template where you want the CSS included:

    {{include '../static/css/styles.css'}}
    

    The {{include}} directive looks for the template to be included relative to the application’s “views” folder, so the “../” goes up one level from there in the folder structure, and from that point, you can just specify the path to the file you want to include.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Well I want to use WEb2Py because it's pretty nice.. I just need to
I have some reusable HTML snippets that I want to 'include' in a number
I have to develop web2py app and have to use Facebook sdk in that.
I'm trying to get to grips with web2py/python. I want to get the user
Web2py docs have two methods for inserting into a database db.tbl[0] = newRow and
In a web2py view, how do I comment out server-side code? In ASP.NET, I
I want to Web2py to just return the error screen/stack-trace... i don't want this
I want to make a simple FORM (not SQLFORM) in web2py with two fields
I am creating a school management system that handles file uploads and downloads from
I need some help to have a widget work correctly in a web2py app.

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.