Problems with references to templates and resources in subfolders
- From:
-
- Date:
- 2010-08-09 @ 09:55
<body bgcolor="#ffffff" background="https://img.web.de/v/p.gif"
class="bgRepeatYes" style="background-repeat: repeat; background-color:
rgb(255, 255, 255); color: rgb(0, 0, 0); font-family: verdana,geneva;
font-size: 9pt; padding-left: 0px;"><div style="min-height: 200px;
background-image: url(https://img.web.de/v/p.gif); background-repeat:
repeat; background-color: #ffffff; font-family: verdana,geneva; font-size:
9pt; padding-left: 0px;"><span style="font-size: 9pt;"><span
style="font-family: verdana,geneva;"><span style="background-color:
transparent;"><span style="color: #000000;"><span style="color:
#000000;"> Hi there!<br /><br /></span></span></span></span></span>I
have an app implemented as a module enbedded in another in a subfolder as
exaplained in the docs(http://flask.pocoo.org/docs/patterns/packages/),
admin. It has its own views, templates and static folders. I can call its
views, but they cannot find the templates. I have tried this "return
render_template('admin/master.html')", "return
render_template('admin/templates/master.html')" return
render_template('./admin/master.html') no avail.<br /><br />Could omeone
temm me what I am doing wrong?<br /><br />The structure looks like this<br
/><br />/myapp<br /> /static<br />
/templates<br /> myapp.py<br /> /admin<br
/> /static<br
/> /templates<br
/>
master.html<br /><br /><br />Thanks<br /><br
/></div> <br><br><table cellpadding="0" cellspacing="0"
border="0"><tr><td bgcolor="#000000"><img src="https://img.web.de/p.gif"
width="1" height="1" border="0" alt="" /></td></tr><tr><td
style="font-family:verdana; font-size:12px; line-height:17px;">WEB.DE DSL
SOMMER-SPECIAL: Surf & Phone Flat 16.000 für
<br>nur 19,99 ¿/mtl.!* <a
href="http://web.de/DSL"><b>http://web.de/DSL</b></a>-Doppel-Flatrate/</td></tr></table>
</body>
Problems with references to templates and resources in subfolders
- From:
-
- Date:
- 2010-08-09 @ 10:05
Hi there!
I have an app implemented as a module enbedded in another in a subfolder
as exaplained in the
docs([http://flask.pocoo.org/docs/patterns/packages/]),
admin. It has its own views, templates and static folders. I can call
its views, but they cannot find the templates. I have tried this
"return render_template('admin/master.html')", "return
render_template('admin/templates/master.html')" return
render_template('./admin/master.html') no avail.
Could omeone temm me what I am doing wrong?
The structure looks like this
/myapp
/static
/templates
myapp.py
/admin
/static
/templates
master.html
Thanks
___________________________________________________________
GRATIS für alle WEB.DE Nutzer: Die maxdome Movie-FLAT!
Jetzt freischalten unter http://movieflat.web.de
Re: [flask] Problems with references to templates and resources in
subfolders
- From:
- Armin Ronacher
- Date:
- 2010-08-09 @ 12:57
Hi,
On 8/9/10 12:05 PM, nhytro-python@web.de wrote:
> Could omeone temm me what I am doing wrong?
Are you createing the admin module in admin/__init__.py with the first
parameter of Module being __name__?
Regards,
Armin